Jes Sorensen [Sat, 14 Jan 2006 00:05:44 +0000 (16:05 -0800)]
[SCSI] sem2mutex: scsi_transport_spi.c
Convert the SCSI transport class code to use a mutex rather than a
semaphore.
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Fri, 13 Jan 2006 21:36:25 +0000 (15:36 -0600)]
[SCSI] fix up message/i2o/pci.c
There was a use before initialisation of c->name
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Fri, 13 Jan 2006 17:27:50 +0000 (18:27 +0100)]
[SCSI] fusion: kzalloc / kcalloc conversion
Convert kmalloc + memset to kzalloc or kcalloc in fusion.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Fri, 13 Jan 2006 17:27:11 +0000 (18:27 +0100)]
[SCSI] fusion: convert semaphores to mutexes
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Fri, 13 Jan 2006 17:04:41 +0000 (18:04 +0100)]
[SCSI] mptsas: support basic hotplug
Adds hotplug support for SAS end devices. Unfortunately the fusion
firmware doesn't generate similar events for expanders addition/removal
so we can't support them yet. Eric has an idea about a clever scheme to
find out about expander changes so that'll be added later on.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Salyzyn, Mark [Thu, 12 Jan 2006 13:31:57 +0000 (08:31 -0500)]
[SCSI] I2O: move pci_request_regions() just behind pci_enable_device()
The problem in dpt_i2o could be the pci config space accesses it
triggers as it loads, dangerous to do if there is any I/O activity going
on in the other driver (probable if a boot driver I guess).
I approve this patch to dpt_i2o.c, and am applying it to the Adaptec
branch of the driver.
Thanks for the investigation Ryoji.
---
In linux 2.6.15, data transfer does hang when both dpt_i2o
and i2o_block drivers are loaded.
It seems that location of pci_request_regions() are wrong.
I moved it just behind pci_enable_device() like other drivers,
and it becomes fine.
Signed-off-by: Ryoji Kamei <kamei@miraclelinux.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jack Hammer [Fri, 13 Jan 2006 15:06:50 +0000 (10:06 -0500)]
[SCSI] ips: Mode Sense (Caching Page ) fix
To avoid the "sda: got wrong page" message, the ServeRAID driver
should be setting flags indicating that the Mode Sense commands are
not supported.
Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andreas Herrmann [Fri, 13 Jan 2006 01:26:11 +0000 (02:26 +0100)]
[SCSI] zfcp: transport class adaptations II
Replaced zfcp adapter attributes with fc_host attributes:
fc_topology by port_type, physical_wwpn by permanent_port_name.
Make use of fc_host attribute supported_speeds.
Removed zfcp adapter attribute physical_s_id.
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andreas Herrmann [Thu, 5 Jan 2006 08:59:34 +0000 (09:59 +0100)]
[SCSI] zfcp: transport class adaptations
Added host stats, removed superfluous get_starget_ functions,
removed some attributes from zfcp specific sysfs tree (e.g.
scsi_host_no, scsi_lun, wwnn and d_id).
Host stats are given for the physical adapter port not for the
virtual adapter. Reset stats is implemented in the device driver.
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Maxim Shchetynin [Thu, 5 Jan 2006 08:56:47 +0000 (09:56 +0100)]
[SCSI] zfcp: handle unsolicited status notification lost
Handle unsolicited adapter status that informs about loss of
previous unsolicited status notification(s).
Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andreas Herrmann [Fri, 13 Jan 2006 01:16:54 +0000 (02:16 +0100)]
[SCSI] fc transport: add permanent_port_name fc_host attribute
Add fc_host attribute permanent_port_name which is
used to show the port name of the primary port -
the port that initially logged into the fabric.
For a virtual port (registered via the primary port with
FDISC command) it is useful to know not only its (virtual)
port name but also the permanent port name.
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Wed, 11 Jan 2006 13:28:06 +0000 (14:28 +0100)]
[SCSI] sr: split sr_audio_ioctl into specific helpers
split each ioctl handled in sr_audio_ioctl into a function of it's own.
This cleans the code up nicely, and allows various places in sr_ioctl
to call these helpers directly instead of going through the multiplexer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Fri, 6 Jan 2006 17:34:07 +0000 (18:34 +0100)]
[SCSI] always handle REQ_BLOCK_PC requests in common code
LLDDs should never see REQ_BLOCK_PC requests, we can handle them just
fine in the core code. There is a small behaviour change in that some
check in sr's rw_intr are bypassed, but I consider the old behaviour
a bug.
Mike found this cleanup opportunity and provdided early patches, so all
the credit goes to him, even if I redid the patches from scratch beause
that was easier than forward-porting the old patches.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Wed, 4 Jan 2006 12:45:20 +0000 (13:45 +0100)]
[SCSI] sas: fix removal of devices behind expanders
We need to iterate over all children when removing and expander, else
stale objects will be around after host removal. This fixes the oops
Eric Moore saw when removing and reloading mptsas.
Also don't try the scsi_remove_target call unless operating on an end
device. The current unconditional call is harmless but confusing.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Petr Vandrovec [Wed, 11 Jan 2006 19:31:07 +0000 (11:31 -0800)]
[SCSI] Pass proper device from BusLogic to SCSI layer
While trying to get SUSE's SLES9 working on system with more than 4GB we've
noticed that SCSI layer happilly passes addresses over 4GB to the buslogic
driver, which is quite a big problem as buslogic can generate only 32bit
busmastering cycles.
Fortunately in the current kernels this problem does not exist anymore as
SCSI layer now assumes 4GB capable device by default, but it is still good
idea to pass correct device structure to the SCSI layer. If nothing else,
/sys/block/sda/device now points to
/sys/devices/pci0000:00/0000:00:10.0/host0/... instead of
/sys/devices/platform/host0/... like it did in the past.
Change does nothing for ISA based BusLogic adapters, they'll still end
under platform (and they are probably broken for long time as I do not see
anything forcing ISA 16MB limit for them).
Signed-off-by: Petr Vandrovec <petr@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Thu, 12 Jan 2006 18:07:13 +0000 (12:07 -0600)]
[SCSI] aic79xx: bump version to 3.0
This takes us past the old 1.x version of the SCSI driver and the 2.x
version of the aic website version to reflect the full incorporation
of both branches.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Thu, 12 Jan 2006 11:08:06 +0000 (12:08 +0100)]
[SCSI] aic79xx: Sequencer update
Update sequencer code to Adaptec version 2.0.12-6.3.9.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Thu, 12 Jan 2006 11:07:02 +0000 (12:07 +0100)]
[SCSI] aic79xx: Sanitize inb/outb handling
This patch coalesces inb/outb calls to the approriate word or long form.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Thu, 12 Jan 2006 11:05:46 +0000 (12:05 +0100)]
[SCSI] aic79xx: Use struct map_node
Use struct map_node instead of separate variables.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Hannes Reinecke [Thu, 12 Jan 2006 11:04:28 +0000 (12:04 +0100)]
[SCSI] aic7xxx/aic79xx: New device ids
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Chuck Ebbert [Thu, 12 Jan 2006 04:58:40 +0000 (23:58 -0500)]
[SCSI] Mask capabilities for SCSI-1 CD drive
SCSI-1 CD drives can't do MRW or be opened for writing, so mask off
those capabilities.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 11 Jan 2006 17:28:57 +0000 (09:28 -0800)]
[SCSI] aacraid: README update
Received From Mark Salyzyn.
Move the README from the driver directory to the Documentation directory.
Updated the documentation, added descriptions for cards that
were missing.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 11 Jan 2006 17:28:29 +0000 (09:28 -0800)]
[SCSI] aacraid: 17 element sg performance update
Received From Mark Salyzyn.
The Jaguar and Corsair class of adapters (2410, 2810, 2610, 21610, CERC)
perform better (about 10% better read performance, write performance
neutral) with current Firmware if the OS limits the number of scatter
gather elements to 17 per request.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 11 Jan 2006 17:28:16 +0000 (09:28 -0800)]
[SCSI] aacraid: better sysfs adapter information
Received from Mark Salyzyn.
Provide more accurate adapter information.
Allows the Adapter Firmware to override the Adapter product
information.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Mark Haverkamp [Wed, 11 Jan 2006 17:28:07 +0000 (09:28 -0800)]
[SCSI] aacraid: Fix default FIB size
Received from Mark Salyzyn.
If the adapter has not instructed us otherwise that it can handle a
'large' FIB, then it can handle at most a 2KB FIB.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Christoph Hellwig [Wed, 11 Jan 2006 13:20:43 +0000 (14:20 +0100)]
[SCSI] sas: clear parent->rphy in sas_rphy_delete
We need to clear the backpointer on rphy removal, else we'll run into
problems with host removal after a device has been hot unplugged.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Arjan van de Ven [Wed, 11 Jan 2006 12:16:10 +0000 (13:16 +0100)]
[SCSI] turn most scsi semaphores into mutexes
the scsi layer is using semaphores in a mutex way, this patch converts
these into using mutexes instead
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
James Bottomley [Tue, 10 Jan 2006 18:11:42 +0000 (12:11 -0600)]
[SCSI] aic7xxx: fix timer handling bug
The driver is doing a rather stupid mod_timer allegedly to "give
request sense more time to complete". This is illegal and pointless,
so just eliminate it. Also eliminate all the other uses of struct
timer_list in the driver, which are mostly bogus.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Andrew Vasquez [Mon, 9 Jan 2006 18:17:40 +0000 (10:17 -0800)]
[SCSI] qla2xxx: Kconfig: two fixes
Original From: Adrian Bunk
Here's a composite patch with Adrian's original additions and
help-text with the new Kconfig variable SCSI_QLA_FC.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Adrian Bunk [Fri, 6 Jan 2006 19:21:28 +0000 (20:21 +0100)]
[SCSI] lpfc_scsi.c: make lpfc_get_scsi_buf() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Adrian Bunk [Thu, 5 Jan 2006 22:39:18 +0000 (23:39 +0100)]
[SCSI] scsi_transport_spi.c: make print_nego() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Moore, Eric [Wed, 4 Jan 2006 21:58:43 +0000 (14:58 -0700)]
[SCSI] raid_class.c - adding RAID10 and RAID10 defines
Adding defines for RAID10 and RAID50 levels, in preparation
of adding RAID Transport support in the mpt fusion drivers.
(BTW: IME is RAID10, and IM is RAID1).
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Linus Torvalds [Thu, 12 Jan 2006 03:36:32 +0000 (19:36 -0800)]
Merge /pub/scm/linux/kernel/git/mchehab/v4l-dvb
Vivek Goyal [Thu, 12 Jan 2006 02:35:20 +0000 (03:35 +0100)]
[PATCH] x86_64: Fix SMP bootup with CONFIG_KDUMP enabled
o This fix was posted for i386 long back. Posting it for x86_64.
http://marc.theaimsgroup.com/?l=linux-kernel&m=
110380103229830&w=2
o This patch fixes the problem of secondary cpus boot up. This situation
is faced when kernel is built for default locations like 16MB and
onwards. In this configuration, only primary cpu (BP) comes and
secondary cpus don't boot.
o Problem occurs because in trampoline code, lgdt is not able to load the
GDT as it happens to be situated beyond 16MB. This is due to the fact
that cpu is still in real mode and default operand size is 16bit.
o This patch uses lgdtl instead of lgdt to force operand size to 32
instead of 16.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:47:10 +0000 (22:47 +0100)]
[PATCH] x86_64: Don't confuse noapic with noapictimer
Handling common prefixes is tricky.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Wed, 11 Jan 2006 21:47:07 +0000 (22:47 +0100)]
[PATCH] x86_64: don't copy command line twice
... reducing the amount of changes Xen has to do.
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 [Wed, 11 Jan 2006 21:47:03 +0000 (22:47 +0100)]
[PATCH] i386/x86-64: make setup_early_printk() usage consistent
The explicit and implicit calls to setup_early_printk() were passing
inconsistent arguments.
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 [Wed, 11 Jan 2006 21:47:00 +0000 (22:47 +0100)]
[PATCH] i386: Move DOUBLEFAULT config to arch/i386/Kconfig
It has no business being elsewhere and x86-64 doesn't need/want it.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:57 +0000 (22:46 +0100)]
[PATCH] x86_64: Allow kernel page tables upto the end of memory
Previously they would be only allocated before the kernel text at
1MB. This limited the maximum supported memory to 128GB.
Now allow the e820 allocator to put them everywhere. Try
to put them beyond any DMA zones to avoid filling them up.
This should free some GFP_DMA memory compared to earlier kernels.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:54 +0000 (22:46 +0100)]
[PATCH] x86_64: Use safe_smp_processor_id in MCE handler
hard_smp_processor_id would return the local APIC id instead
of the Linux processor id. On big systems they are often
not identical. safe_smp_processor_id is just a wrapper
around it that does the necessary conversions.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:51 +0000 (22:46 +0100)]
[PATCH] x86_64: Some housekeeping in local APIC code
Remove support for obsolete hardware and cleanup.
- Remove checks for non integrated APICs
- Replace apic_write_around with apic_write.
- Remove apic_read_around
- Remove APIC version reads used by old workarounds
- Remove old workaround for Simics
- Fix indentation
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Wed, 11 Jan 2006 21:46:48 +0000 (22:46 +0100)]
[PATCH] x86_64: Display meaningful part of filename during BUG()
When building in a separate objtree, file names produced by BUG() & Co. can
get fairly long; printing only the first 50 characters may thus result in
(almost) no useful information. The following change makes it so that rather
the last 50 characters of the filename get printed.
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 [Wed, 11 Jan 2006 21:46:45 +0000 (22:46 +0100)]
[PATCH] x86_64: Reduce screen space needed by stack trace
Especially under Xen, where the console cannot be adjusted to more than 25
lines, it is fairly important that the information displayed during a panic
is as compact as possible. Below adjustments work towards that.
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 [Wed, 11 Jan 2006 21:46:42 +0000 (22:46 +0100)]
[PATCH] x86_64: Fix get_cmos_time()
Due to a broken condition, the body of the loop that is intended to wait for
the Update-In-Progress bit to get set and then cleared again was never
entered; in fact, the entire loop was optimized out by the compiler. Here is
a change to fix the condition (and to also move the initialization of locals
out of the spin lock protected region).
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 [Wed, 11 Jan 2006 21:46:39 +0000 (22:46 +0100)]
[PATCH] x86_64: No need to export get_cmos_time anymore
It was only needed for APM
Pointed out by Jan Beulich
Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:36 +0000 (22:46 +0100)]
[PATCH] x86_64: Remove unused AMD K8 C stepping flag
X86_FEATURE_K8_C was a synthetic Linux CPUID flag that was used for some
code optimizations in Opteron C stepping or later. But support for pre C
stepping optimizations has been removed, so this isn't needed anymore.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:33 +0000 (22:46 +0100)]
[PATCH] i386: Move phys_proc_id/early intel workaround to correct function.
early_cpu_detect only runs on the BP, but this code needs to run
on all CPUs.
Looks like a mismerge somewhere. Also add a warning comment.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stephen Hemminger [Wed, 11 Jan 2006 21:46:30 +0000 (22:46 +0100)]
[PATCH] x86_64: sparse warning cleanups
Fix some trivial sparse warnings in x86_64 code.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:27 +0000 (22:46 +0100)]
[PATCH] x86_64: Move NUMA page_to_pfn/pfn_to_page functions out of line
Saves about ~18K .text in defconfig
There would be more optimization potential, but that's for later.
Suggestion originally from Bill Irwin.
Fix from Andy Whitcroft.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:24 +0000 (22:46 +0100)]
[PATCH] x86_64: Remove unused segments
They used to be used by the reboot code, but not anymore.
Noticed by Jan Beulich
Cc: JBeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vivek Goyal [Wed, 11 Jan 2006 21:46:21 +0000 (22:46 +0100)]
[PATCH] x86_64: ioapic virtual wire mode fix
o Currently, during kexec reboot, IOAPIC is re-programmed back to virtual
wire mode if there was an i8259 connected to it. This enables getting
timer interrupts in second kernel in legacy mode.
o After putting into virtual wire mode, IOAPIC delivers the i8259 interrupts
to CPU0. This works well for kexec but not for kdump as we might crash
on a different CPU and second kernel will not see timer interrupts.
o This patch modifies the redirection table entry to deliver the timer
interrupts to the cpu we are rebooting (instead of hardcoding to zero).
This ensures that second kernel receives timer interrupts even on a
non-boot cpu.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran G Thirumalai [Wed, 11 Jan 2006 21:46:18 +0000 (22:46 +0100)]
[PATCH] x86_64: Inclusion of ScaleMP vSMP architecture patches - vsmp_arch
Introduce vSMP arch to the kernel.
This patch:
1. Adds CONFIG_X86_VSMP
2. Adds machine specific macros for local_irq_disabled, local_irq_enabled
and irqs_disabled
3. Writes to the vSMP CTL device to indicate kernel compiled with CONFIG_VSMP
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran G Thirumalai [Wed, 11 Jan 2006 21:46:15 +0000 (22:46 +0100)]
[PATCH] x86_64: Inclusion of ScaleMP vSMP architecture patches - vsmp_align
vSMP specific alignment patch to
1. Define INTERNODE_CACHE_SHIFT for vSMP
2. Use this for alignment of critical structures
3. Use INTERNODE_CACHE_SHIFT for ARCH_MIN_TASKALIGN,
and let the slab align task_struct allocations to the internode cacheline size
4. Introduce and use ARCH_MIN_MMSTRUCT_ALIGN for mm_struct slab allocations.
Signed-off-by: Ravikiran Thirumalai <kiran@scalemp.com>
Signed-off-by: Shai Fultheim <shai@scalemp.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:46:12 +0000 (22:46 +0100)]
[PATCH] x86_64: Make sure BITS_PER_ATOMIC is defined in asm-generic/atomic.h
Fixes
CC fs/nfsctl.o
In file included from include2/asm/atomic.h:427,
from /home/lsrc/quilt/linux/include/linux/file.h:8,
from /home/lsrc/quilt/linux/fs/nfsctl.c:8:
/home/lsrc/quilt/linux/include/asm-generic/atomic.h:20:5: warning: "BITS_PER_LONG" is not defined
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Brian Gerst [Wed, 11 Jan 2006 21:46:09 +0000 (22:46 +0100)]
[PATCH] x86_64: cleanup enter_lazy_tlb()
Move the #ifdef into the function body.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric W. Biederman [Wed, 11 Jan 2006 21:46:06 +0000 (22:46 +0100)]
[PATCH] x86_64: Memorize location of i8259 for reboots.
Currently we attempt to restore virtual wire mode on reboot, which only
works if we can figure out where the i8259 is connected. This is very
useful when we are kexec another kernel and likely helpful to an peculiar
BIOS that make assumptions about how the system is setup.
Since the acpi MADT table does not provide the location where the i8259 is
connected we have to look at the hardware to figure it out.
Most systems have the i8259 connected the local apic of the cpu so won't be
affected but people running Opteron and some serverworks chipsets should be
able to use kexec now.
In addition this patch removes the hard coded assumption that the io_apic
that delivers isa interrups is always known to the kernel as io_apic 0.
There does not appear to be anything to guarantee that assumption is true.
And From: Vivek Goyal <vgoyal@in.ibm.com>
A minor fix to the patch which remembers the location of where i8259 is
connected. Now counter i has been replaced by apic. counter i is having
some junk value which was leading to non-detection of i8259 connected to
IOAPIC.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chuck Ebbert [Wed, 11 Jan 2006 21:46:03 +0000 (22:46 +0100)]
[PATCH] x86_64: allow setting RF in EFLAGS
Setting RF (resume flag) allows a debugger to resume execution after a code
breakpoint without tripping the breakpoint again. It is reset by the CPU
after executing one instruction.
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>
Chuck Ebbert [Wed, 11 Jan 2006 21:46:00 +0000 (22:46 +0100)]
[PATCH] x86_64: "invalid operand" -> "invalid opcode"
The manual says Int 6 is "invalid opcode", not "invalid operand".
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>
Luiz Fernando Capitulino [Wed, 11 Jan 2006 21:45:57 +0000 (22:45 +0100)]
[PATCH] x86_64: Sparse warnings fix.
Fixes the following sparse warnings:
arch/x86_64/kernel/mce_amd.c:321:29: warning: Using plain integer as NULL pointer
arch/x86_64/kernel/mce_amd.c:410:41: warning: Using plain integer as NULL pointer
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:54 +0000 (22:45 +0100)]
[PATCH] x86_64: Remove useless KDB vector
It was set as an NMI, but the NMI bit always forces an interrupt
to end up at vector 2. So it was never used. Remove.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jason Uhlenkott [Wed, 11 Jan 2006 21:45:51 +0000 (22:45 +0100)]
[PATCH] x86_64: Don't claim too many vectors for TLB flushing
It looks like the new scalable TLB flush code for x86_64 is claiming
one more IRQ vector than it actually uses.
Signed-off-by: Jason Uhlenkott <jasonuhl@sgi.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:48 +0000 (22:45 +0100)]
[PATCH] x86_64: Tell user to enable GART_IOMMU when needed
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:45 +0000 (22:45 +0100)]
[PATCH] x86_64: Fix warning in nmi.c on uniprocessor kernels
Fix
CC arch/x86_64/kernel/nmi.o
linux/arch/x86_64/kernel/nmi.c: In function ???check_nmi_watchdog???:
linux/arch/x86_64/kernel/nmi.c:155: warning: statement with no effect
on Uniprocessor builds.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran G Thirumalai [Wed, 11 Jan 2006 21:45:42 +0000 (22:45 +0100)]
[PATCH] x86_64: Allocate PDAs in the local node
Patch uses a static PDA array early at boot and reallocates processor PDA
with node local memory when kmalloc is ready, just before pda_init.
The boot_cpu_pda is needed since the cpu_pda is used even before pda_init for
that cpu is called (to set the static per-cpu areas offset table etc)
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran G Thirumalai [Wed, 11 Jan 2006 21:45:39 +0000 (22:45 +0100)]
[PATCH] x86_64: Node local pda take 2 -- cpu_pda preparation
Helper patch to change cpu_pda users to use macros to access cpu_pda
instead of the cpu_pda[] array.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran Thirumalai [Wed, 11 Jan 2006 21:45:36 +0000 (22:45 +0100)]
[PATCH] x86_64: Early initialization of cpu_to_node
Patch enables early intialization of cpu_to_node.
apicid_to_node is built by reading the SRAT table, from acpi_numa_init with
ACPI_NUMA and k8_scan_nodes with K8_NUMA.
x86_cpu_to_apicid is built by parsing the ACPI MADT table, from acpi_boot_init.
We combine these two tables and setup cpu_to_node.
Early intialization helps the static per_cpu_areas in getting pages from
correct node.
Change since last release:
Do not initialize early init_cpu_to_node for faking node cases.
Patch tested on TYAN dual core 4P board with K8 only, ACPI_NUMA.
Tested on EM64T NUMA. Also tested with numa=off, numa=fake, and running
a kernel compiled with NUMA on a regular EM64 2 way SMP.
Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:33 +0000 (22:45 +0100)]
[PATCH] x86_64: Fix up white space in time.c
No functional changes.
And remove one redundant prototype.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:30 +0000 (22:45 +0100)]
[PATCH] x86_64: Use standard __always_inline in vsyscall.c
Replacing the old home brewn __force_inline.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:27 +0000 (22:45 +0100)]
[PATCH] i386: Replace broken serialize_cpu in microcode driver with correct sync_core
Passing random input values in eax to cpuid is not a good idea
because the CPU will GPF for unknown ones.
Use the correct x86-64 version that exists for a longer time too.
This also adds a memory barrier to prevent the optimizer from
reordering.
Cc: tigran@veritas.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:24 +0000 (22:45 +0100)]
[PATCH] x86_64: On Intel CPUs don't do an additional CPU sync before RDTSC
RDTSC serialization using cpuid is not needed for Intel platforms.
This increases gettimeofday performance.
Cc: vojtech@suse.cz
Cc: rohit.seth@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:21 +0000 (22:45 +0100)]
[PATCH] x86_64: Support alternative() in vsyscalls
The real vsyscall .text addresses are not mapped when the alternative()
replacement runs early, so use some black magic to access them using
the direct mapping.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:18 +0000 (22:45 +0100)]
[PATCH] x86_64: Support alternative() with a output argument.
Needed for follow on patches
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:15 +0000 (22:45 +0100)]
[PATCH] x86_64: Don't try to synchronize the TSC over CPUs on Intel CPUs at boot.
They already do this in hardware and the Linux algorithm
actually adds errors.
Cc: mingo@elte.hu
Cc: rohit.seth@intel.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:12 +0000 (22:45 +0100)]
[PATCH] x86_64: Fix compile error with !CONFIG_COMPAT
cpumask.h wasn't included implicitely into proto.h in this case.
Just move it over to smp.h
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Vivek Goyal [Wed, 11 Jan 2006 21:45:09 +0000 (22:45 +0100)]
[PATCH] x86_64: x86_64 write apic id fix
o Apic id is in most significant 8 bits of APIC_ID register. Current code
is trying to write apic id to least significant 8 bits. This patch fixes
it.
o This fix enables booting uni kdump capture kernel on a cpu with non-zero
apic id.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Brian Gerst [Wed, 11 Jan 2006 21:45:06 +0000 (22:45 +0100)]
[PATCH] x86_64: Remove duplicate exports
Remove exports that are already exported from the object's source file.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Brian Gerst [Wed, 11 Jan 2006 21:45:03 +0000 (22:45 +0100)]
[PATCH] x86_64: unexport pci_*_consistent
These functions are inlines and shouldn't be exported.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:45:00 +0000 (22:45 +0100)]
[PATCH] x86_64: Remove unused apic_write_atomic
This function is never used for x86_64.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:57 +0000 (22:44 +0100)]
[PATCH] x86_64: Make the cpu_*_maps in kernel/sched.c read mostly
They are referred to often so avoid potential false sharing for them.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:54 +0000 (22:44 +0100)]
[PATCH] i386: make pci_map_single/pci_map_sg warn for zero length.
As suggested by Linus.
This catches driver bugs that could cause corruption on IOMMU architectures.
Also I converted the BUGs to out_of_line_bug()s to save a bit
of text space.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:51 +0000 (22:44 +0100)]
[PATCH] x86_64: Enable sound in old style OSS driver for NForce4 CK804
Just add the missing PCI ID.
Cc: perex@suse.cz
Cc: tiwai@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:48 +0000 (22:44 +0100)]
[PATCH] x86_64: Make it clear in machine checks that it's an hardware problem
Hopefully the users will take the hint.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:45 +0000 (22:44 +0100)]
[PATCH] x86_64: Clean up copy_*_user
- Remove optimization for old B stepping Opteron
- Make the fast path for copies with a multiple of eight length faster.
- Minor instruction rearrangement to hopefully avoid a pipeline
stall or two.
- Add comment about errata to consider.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Muli Ben-Yehuda [Wed, 11 Jan 2006 21:44:42 +0000 (22:44 +0100)]
[PATCH] x86_64: Use function pointers to call DMA mapping functions
AK: I hacked Muli's original patch a lot and there were a lot
of changes - all bugs are probably to blame on me now.
There were also some changes in the fall back behaviour
for swiotlb - in particular it doesn't try to use GFP_DMA
now anymore. Also all DMA mapping operations use the
same core dma_alloc_coherent code with proper fallbacks now.
And various other changes and cleanups.
Known problems: iommu=force swiotlb=force together breaks
needs more testing.
This patch cleans up x86_64's DMA mapping dispatching code. Right now
we have three possible IOMMU types: AGP GART, swiotlb and nommu, and
in the future we will also have Xen's x86_64 swiotlb and other HW
IOMMUs for x86_64. In order to support all of them cleanly, this
patch:
- introduces a struct dma_mapping_ops with function pointers for each
of the DMA mapping operations of gart (AMD HW IOMMU), swiotlb
(software IOMMU) and nommu (no IOMMU).
- gets rid of:
if (swiotlb)
return swiotlb_xxx();
- PCI_DMA_BUS_IS_PHYS is now checked against the dma_ops being set
This makes swiotlb faster by avoiding double copying in some cases.
Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
Signed-Off-By: Jon D. Mason <jdmason@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:39 +0000 (22:44 +0100)]
[PATCH] x86_64: Reject SRAT tables that don't cover all memory
Broken BIOS on Iwill 8way systems reports these and it causes the bootmem
allocator to crash. Add a sanity check if all the PXMs in the
SRAT table cover all memory as reported by e820. If the sanity
check fails the SRAT is rejected and the code will fall back
to discover the NUMA topology using the K8 northbridge registers
when applicable.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:36 +0000 (22:44 +0100)]
[PATCH] x86_64: Add idle notifiers
This adds a new notifier chain that is called with IDLE_START
when a CPU goes idle and IDLE_END when it goes out of idle.
The context can be idle thread or interrupt context.
Since we cannot rely on MONITOR/MWAIT existing the idle
end check currently has to be done in all interrupt
handlers.
They were originally inspired by the similar s390 implementation.
They have a variety of applications:
- They will be needed for CONFIG_NO_IDLE_HZ
- They can be used for oprofile to fix up the missing time
in idle when performance counters don't tick.
- They can be used for better C state management in ACPI
- They could be used for microstate accounting.
This is just infrastructure so far, no users.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:33 +0000 (22:44 +0100)]
[PATCH] x86_64: Clean up some printks in NUMA code
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:30 +0000 (22:44 +0100)]
[PATCH] x86_64: Fix up coding style in numa.c
No functional changes
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:27 +0000 (22:44 +0100)]
[PATCH] x86_64: Fix off by one in IOMMU check
Fix off by one when checking if the machine has enougn memory to need IOMMU
This caused the IOMMUs to be needlessly enabled for mem=4G
Based on a patch from Jon Mason
Signed-off-by: jdmason@us.ibm.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Venkatesh Pallipadi [Wed, 11 Jan 2006 21:44:24 +0000 (22:44 +0100)]
[PATCH] x86_64: Handle missing local APIC timer interrupts on C3 state
Whenever we see that a CPU is capable of C3 (during ACPI cstate init), we
disable local APIC timer and switch to using a broadcast from external timer
interrupt (IRQ 0).
Patch below adds the code for x86_64.
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>
Venkatesh Pallipadi [Wed, 11 Jan 2006 21:44:21 +0000 (22:44 +0100)]
[PATCH] i386: Handle missing local APIC timer interrupts on C3 state
Whenever we see that a CPU is capable of C3 (during ACPI cstate init), we
disable local APIC timer and switch to using a broadcast from external timer
interrupt (IRQ 0). This is needed because Intel CPUs stop the local
APIC timer in C3. This is currently only enabled for Intel CPUs.
Patch below adds the code for i386 and also the ACPI hunk.
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>
Venkatesh Pallipadi [Wed, 11 Jan 2006 21:44:18 +0000 (22:44 +0100)]
[PATCH] i386/x86-64: Remove sub jiffy profile timer support
Remove the finer control of local APIC timer. We cannot provide a sub-jiffy
control like this when we use broadcast from external timer in place of
local APIC. Instead of removing this only on systems that may end up using
broadcast from external timer (due to C3), I am going the
"I'm feeling lucky" way to remove this fully. Basically, I am not sure about
usefulness of this code today. Few other architectures also don't seem to
support this today.
If you are using profiling and fine grained control and don't like this going
away in normal case, yell at me right now.
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>
John Blackwood [Wed, 11 Jan 2006 21:44:15 +0000 (22:44 +0100)]
[PATCH] x86_64: Report hardware breakpoints in user space when triggered by the kernel
I would like to throw out a suggestion for a possible change in the way that
the debug register traps are handled in do_debug() when the trap occurs
in kernel-mode.
In the x86_64 version of do_debug(), the code will skip around sending
a SIGTRAP to the current task if the trap occurred while in kernel mode.
On the i386-side of things, if the access happens to occur in kernel mode
(say during a read(2) of user's buffer that matches the address of a
debug register trap), then the do_debug() routine for i386 will go ahead
and call send_sigtrap() and send the SIGTRAP signal. The send_sigtrap()
code will also set the info.si_addr to NULL in this case (even though I
don't understand why, since the SIGTRAP siginfo processing doesn't use
the si_addr field...).
So I would like to suggest that the x86_64 do_debug() routine also
follow this type of behavior and have it go ahead and send the
SIGTRAP signal to the current task, even if the debug register trap
happens to have occurred in kernel mode. I have taken a stab at
a patch for this change below. (It includes the i386-ish change
for setting si_addr to NULL when the trap occurred in kernel mode.)
It seems like a useful feature to be able to 'watch' a user location that
might also be modified in the kernel via a system service call, and have the
debugger report that information back to the user, rather than to just
silently ignore the trap.
Additionally, I realize that users that pull in a kernel debugger such as
KGDB into their kernel might want to remove this change below when they add
in KGDB support. However, they could alternatively look at the current
task's thread.debugreg[] values to see if the trap occurred due to KGDB
or instead because of a user-space debugger trap, and still honor the
user SIGTRAP processing (instead of the KGDB breakpoint processing)
if the trap matches up with the thread.debugreg[] registers.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Wed, 11 Jan 2006 21:44:12 +0000 (22:44 +0100)]
[PATCH] x86_64: "extern inline" -> "static inline" in pgtable.h
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:09 +0000 (22:44 +0100)]
[PATCH] x86_64: Convert page fault error codes to symbolic constants.
Much better to deal with these than with the magic numbers.
And remove the comment describing the bits - kernel source
is no replacement for an architecture manual.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:06 +0000 (22:44 +0100)]
[PATCH] x86_64: Implement is_compat_task the right way
By setting a flag during a 32bit system call only
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:03 +0000 (22:44 +0100)]
[PATCH] x86_64: Implement compat code for sg driver SG_GET_REQUEST_TABLE ioctl
Apparently helps with some non SANE scanner drivers.
Cc: axboe@suse.de
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:44:00 +0000 (22:44 +0100)]
[PATCH] x86_64: Remove unnecessary case from the page fault handler
Don't need to do the vmalloc check for the module range because its
PML4 is shared with the kernel text.
Also removed an unnecessary TLB flush.
Pointed out by Jan Beulich
Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ravikiran G Thirumalai [Wed, 11 Jan 2006 21:43:57 +0000 (22:43 +0100)]
[PATCH] x86_64: Align and pad x86_64 GDT on page boundary
This patch is on the same lines as Zachary Amsden's i386 GDT page alignemnt
patch in -mm, but for x86_64.
Patch to align and pad x86_64 GDT on page boundries.
[AK: some minor cleanups and fixed incorrect TLS initialization
in CPU init.]
Signed-off-by: Nippun Goel <nippung@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 11 Jan 2006 21:43:54 +0000 (22:43 +0100)]
[PATCH] x86_64: Allow compilation on a 32bit biarch toolchain
This might help on distributions that use a 32bit biarch compiler.
First pass -m64 by default.
Secondly add some more .code32s because at least the Ubuntu biarch
32bit as called by gcc doesn't seem to handle -m64 -m32 as generated
by the Makefile without such assistance.
And finally make sure the linker script can be preprocessed
with a 32bit cpp.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>