Commit Graph

550 Commits

Author SHA1 Message Date
Kumar Gala 91f9855a7a [PATCH] ppc32: Fix building MPC8555 CDS when CONFIG_PCI is disabled
The patch that introduced support for the VIA chipset broke building if
CONFIG_PCI is disabled.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:16 -07:00
Vitaly Bordug a6dbba77a9 [PATCH] ppc32: Support for 82xx PQII on-chip PCI bridge
This patch adds on-chip PCI bridge support for the PQ2 family.  The
incomplete existent code is updated with interrupt handling stuff and
board-specific bits for 8272ADS and PQ2FADS; the related files were renamed
(from m8260_pci to m82xx_pci) to be of more generic fashion.  This is
tested with 8266ADS and 8272ADS, should work on PQ2FADS as well.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:15 -07:00
Kumar Gala ed36959621 [PATCH] ppc32: Add VIA IDE support to MPC8555 CDS platform
Add support for the VIA IDE controller that exists on the MPC8555 CDS
system.  Updated the config for the system to enable support by default.

Signed-off-by: Scott Hall <shall@mvista.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:15 -07:00
Kumar Gala 252fcaed48 [PATCH] ppc32: Fix some minor issues related to FSL Book-E KGDB support
Some debug registers needed to be initialized early on to allow proper
support for KGDB.  Additionally, we need to setup the
ppc.md_early_serial_map function pointer on boards that have serial support
for KGDB.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:15 -07:00
Kumar Gala 94b9f46d61 [PATCH] ppc32: Fix uImage make target to report success correctly
The existing make rule when building a uImage would check to see if the
image file existed to report 'is ready' or 'not made'.  However make
appeared to compute the file list before the rule was executed.

Signed-off-by: Chris Clark <cpclark@xmission.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:14 -07:00
Paolo 'Blaisorblade' Giarrusso 8e21683bb4 [PATCH] uml: remove jail mode + other leftovers
This var is currently useless, as it's apparent from reading the code. Until
2.6.11 it was used in some code related to jail mode, in the same proc.:

        if(jail){
		while(!reading) sched_yield();
	}

jail mode has been dropped, together with that use, so let's finish dropping
this.

Also, remove some other useless definitions I met.

Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:14 -07:00
Paolo 'Blaisorblade' Giarrusso f767b02f35 [PATCH] uml: fixlet for arch_prctl_skas
Fix it a bit (after some cross checking with "man arch_prctl"). There were:
*) typos FS/GS and back
*) FS in place of FS_BASE (and the same for GS)
*) the procedure used put_user on &addr, where addr was the parameter (i.e.
changed its param with put_user, completely useless) rather than interpreting
addr as a pointer, as requested in this case (see the man page).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:14 -07:00
Paolo 'Blaisorblade' Giarrusso b3461034d7 [PATCH] uml: stack dump fix
Copy (and adapt) to UML the stack code dumper used in i386 when
CONFIG_FRAME_POINTER is enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:13 -07:00
Paolo 'Blaisorblade' Giarrusso 37fce857be [PATCH] uml: split CONFIG_FRAME_POINTER from DEBUG_INFO
Until now, FRAME_POINTER was set = DEBUG_INFO for UML.  Change it to be the
default way, so that it can be enabled alone (for instance to get better
backtraces on crashes).  The call-trace dumper which uses the frame pointer is
not yet in, I'm going to introduce it in a separate patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:13 -07:00
Paolo 'Blaisorblade' Giarrusso 567b56508f [PATCH] uml: add MOD_LICENSE to random driver
Add a MODULE_LICENSE("GPL") to the driver, remove some unused macros and add
the GPL license (it's GPL-licensed anyway since it's a GPL-derivative, apart
that Jeff Dike releases GPL software, in case anybody is wondering).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:12 -07:00
Jeff Dike 7590d3ec1c [PATCH] uml: remove unused code
This removes two now unused files and a couple of unused functions.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:12 -07:00
Jeff Dike 92515da73a [PATCH] uml: fix segfault on exit with CONFIG_GCOV
We need to disable signals on exit in all cases, not just when rebooting.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:12 -07:00
Jeff Dike 0894e27e79 [PATCH] uml: single-space a help message
One of the ubd driver help strings was bust.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:11 -07:00
Jeff Dike a2e4b972c9 [PATCH] uml: remove 2_5compat.h
Remove old useless header that was used in Ye Olde Times during 2.4->2.5
porting to abstract differences.  It's definitions are no more used anyway, so
let's finally kill it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:11 -07:00
Jeff Dike 6770cb61ff [PATCH] uml: turn off kmalloc always on a fatal signal
We should turn off kmalloc when getting a fatal signal regardless of the mode
we're in.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:11 -07:00
Jeff Dike b9e0d0696c [PATCH] uml: fix a couple of warnings
Eliminate an unused variable warning in ptrace.c and a size mismatch warning
by adding a cast to __pa.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 16:46:11 -07:00
Benjamin Herrenschmidt b16eeb4729 [PATCH] ppc32: Fix cpufreq vs. sleep issue
Recent kernels occasionally trigger a PMU timeout on some mac laptops,
typically on wakeup from sleep.  This seem to be caused by either a too big
latency caused by the cpufreq switch on wakeup from sleep or by an
interrupt beeing lost due to the reset of the interrupt controller done
during wakeup.

This patch makes that code more robust by stopping PMU auto poll activity
around cpufreq changes on machines that use the PMU for such changes (long
latency switching involving a CPU hard reset and flush of all caches) and
by removing the reset of the open pic interrupt controller on wakeup (that
can cause the loss of an interrupt and Darwin doesn't do it, so it must not
be necessary).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 11:14:01 -07:00
Siddha, Suresh B 49f384b82b [PATCH] x86: fix smp_num_siblings on buggy BIOSes
This fixes 'smp_num_siblings' value on the systems with a buggy bios,
which sets number of siblings to '2' even when HT is disabled.  (more
details are at http://bugzilla.kernel.org/show_bug.cgi?id=4359)

I am planning to do more cleanup in this area (like moving smp_num_siblings
to per cpuinfo) shortly.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 11:14:00 -07:00
Adrian Bunk 70ffc71c5c [PATCH] arch/i386/kernel/cpu/intel_cacheinfo.c: section fix
num_cache_leaves is used in __devexit cache_remove_dev() and can therefore
not be __devinit.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 11:14:00 -07:00
Benjamin Herrenschmidt d6649bc76a [PATCH] ppc32: small cpufreq update
This patch adds a missing attribute to pmac cpufreq so that
"scaling_available_frequencies" works.  It also cleans up the duplicate
definitions for low and high speed constants.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: John Clemens <clemej@alum.rpi.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 11:13:59 -07:00
Oliver Korpilla c5924b7d97 [PATCH] x86_64: signal.c build fix
For unspecified reasons, arch/x86_64/kernel/signal.c apparently needs
ia32_unistd.h.

Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-28 11:13:59 -07:00
Alexander Nyberg 8aadff7dd5 [PATCH] Note on ACPI build fix
Even after the previous fix you can still set CONFIG_ACPI_BOOT
indirectly even without CONFIG_ACPI by choosing CONFIG_PCI and
CONFIG_PCI_MMCONFIG.

That doesn't build very well either.

This makes PCI_MMCONFIG depend on ACPI, fixing that hole.

[ I guess in theory Kconfig could follow the whole chain of dependencies
  for things that get selected, but that sounds insanely complicated, so
  we'll just fix up these things by hand.  --Linus ]

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-27 08:15:05 -07:00
Len Brown 25be5e6ccc [PATCH] VIA IRQ quirk
Delete quirk_via_bridge(), restore quirk_via_irqpic() -- but now
improved to be invoked upon device ENABLE, and now only for VIA devices
-- not all devices behind VIA bridges.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-27 08:15:04 -07:00
Zhang Yanmin d11cf326bd [IA64] sys_mmap doesn't follow posix.1 when parameter len=0
In IA64 kernel, sys_mmap calls do_mmap2 and do_mmap2 returns addr if
len=0, which means the mmap sys call succeeds.

Posix.1 says:
The mmap() function shall fail if:
[EINVAL] The value of len is zero. 

Here is a patch to fix it.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Acked-by: David Mosberger <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-26 10:19:07 -07:00
Linus Torvalds bef9c55884 Merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-05-25 18:01:26 -07:00
Alexander Nyberg 4f60fdf613 [PATCH] x86_64: CONFIG_BUG=n fixes
Fixes some !CONFIG_BUG warnings:
include/asm/mmu_context.h: I funktion `switch_mm':
include/asm/mmu_context.h:57: varning: implicit declaration of function `out_of_line_bug'

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-25 15:31:28 -07:00
David S. Miller 4b463f7858 Merge of /home/davem/src/GIT/linux-2.6/.git/ 2005-05-25 14:58:04 -07:00
Stephen Rothwell d0e8e29100 [PATCH] ppc64 iSeries: fix boot time setting
For quite a while, there has existed a hypervisor bug on legacy iSeries
which means that we do not get the boot time set in the kernel.  This
patch works around that bug.  This was most noticable when the root
partition needed to be checked at every boot as the kernel thought it
was some time in 1905 until user mode reset the time correctly.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-25 10:13:43 -07:00
Stephen Rothwell 8f80e5c911 [PATCH] ppc64: fix initialisation of gettimeofday calculations
On PPC64, we keep track of when we need to update jiffies (and the
variables used to calculate the time of day) based on the time base.

If the time base frequence is sufficiently high compared to the
processor clock frequency, then it is possible for the time of day
variables to be corrupted at the time of the first decrementer interrupt
we take.  This became obvious on a legacy iSeries where the time base
frequency is the same as the processor clock.

This one line patch fixes the initialisation so that the time of day
variables and the indicator we use to tell when updates are due are
better synchronised.

Signed-off-by:  Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-25 10:13:42 -07:00
Dominik Hackl 6431e6a28e [PATCH] voyager_smp.c static inline fix
This patch fixes a compile bug by moving a static inline function to the
right place.  The body of a static inline function has to be declared
before the use of this function.

Signed-off-by: Dominik Hackl <dominik@hackl.dhs.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-24 20:08:12 -07:00
David S. Miller 816242da37 [SPARC64]: Add boot option to force UltraSPARC-III P-Cache on.
Older UltraSPARC-III chips have a P-Cache bug that makes us disable it
by default at boot time.

However, this does hurt performance substantially, particularly with
memcpy(), and the bug is _incredibly_ obscure.  I have never seen it
triggered in practice, ever.

So provide a "-P" boot option that forces the P-Cache on.  It taints
the kernel, so if it does trigger and cause some data corruption or
OOPS, we will find out in the logs that this option was on when it
happened.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-23 15:52:08 -07:00
Benjamin Herrenschmidt f10d20c1f1 [PATCH] ppc64: Fix g5 hw timebase sync
The hardware sync of the timebase on SMP G5s uses a black magic
incantation to the i2c clock chip that was inspired from what Darwin
does.

However, this was an earlier version of Darwin that was ...  buggy !
heh.  This causes the latest models to break though when starting SMP,
so it's worth fixing.

Here's a new version of the incantation based on careful transcription
of the said incantations as found in the latest version of apple's
temple.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-23 11:51:24 -07:00
Kumar Gala e16fa6b9d2 [PATCH] ppc32: Fix an off-by-one error in ipic_init
There is an off-by-one error in the IPIC code that configures the
external interrupts (Edge or Level Sensitive).

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-23 10:58:31 -07:00
Benjamin Herrenschmidt 1263cc67c0 [PATCH] ppc64: Fix booting on latest G5 models
The latest speedbumped Apple G5 models have a "bug" in the Open Firmware
device tree that lacks the proper interrupt routing information for the
northbridge i2c controller.  Apple's driver silently falls back into a
sub-optimal "polled" mode (heh, maybe they didn't even notice the bug
because of that :), our driver didn't properly check and crashes :(

This patch fixes our driver to not crash, and adds code to the
prom_init() OF trampoline code that detects the "bug" and adds the
missing information back for this chipset revision.  This fixes booting
and thermal control on these models.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-22 17:34:42 -07:00
Andi Kleen 2df9fa3664 [PATCH] x86_64: i386/x86-64: Export cpu_core_map
Needed for the powernow k8 driver for dual core support.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: <mark.langsdorf@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:21 -07:00
Andi Kleen 14d98cad82 [PATCH] x86_64: Add option to disable timer check
This works around the too fast timer seen on some ATI boards.

I don't feel confident enough about it yet to enable it by default, but give
users the option.

Patch and debugging from Christopher Allen Wing <wingc@engin.umich.edu>, with
minor tweaks (renamed the option and documented it)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:21 -07:00
Andi Kleen 607a168583 [PATCH] x86_64: Fix 32bit system call restart
The test case at
http://cvs.sourceforge.net/viewcvs.py/posixtest/posixtestsuite/conforman
ce/interfaces/clock_nanosleep/1-5.c fails if it runs as a 32bit process on
x86_86 machines.

The root cause is the sub 32bit process fails to restart the syscall after it
is interrupted by a signal.

The syscall number of sys_restart_syscall in table sys_call_table is
__NR_restart_syscall (219) while it's __NR_ia32_restart_syscall
(0) in ia32_sys_call_table. When regs->rax==(unsigned
long)-ERESTART_RESTARTBLOCK, function do_signal doesn't distinguish if
the process is 64bit or 32bit, and always sets restart syscall number
as __NR_restart_syscall (219).

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:21 -07:00
Andi Kleen 4057923614 [PATCH] i386: Fix race in iounmap
We need to hold the vmlist_lock while doing change_page_attr, otherwise we
could reset someone else's mapping.

Requires previous patch to add __remove_vm_area

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:20 -07:00
Andi Kleen 7856dfeb23 [PATCH] x86_64: Fixed guard page handling again in iounmap
Caused oopses again.  Also fix potential mismatch in checking if
change_page_attr was needed.

To do it without races I needed to change mm/vmalloc.c to export a
__remove_vm_area that does not take vmlist lock.

Noticed by Terence Ripperda and based on a patch of his.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:20 -07:00
Andi Kleen c4d1fcf3a2 [PATCH] x86_64: Don't allow accesses below register frame in ptrace
There was a "off by one quad word" error in there.  I don't think it is
exploitable because it will only store into a unused area, but better to plug
it.

Found and fixed by John Blackwood

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:20 -07:00
Andi Kleen b41e29398a [PATCH] x86_64: 386/x86-64 Further AMD dual core fixes
- Remove duplicated ifdef
- Make core_id match what Intel uses
- Initialize phys_proc_id correctly for non DC case
- Handle non power of two core numbers.

Fixes for both i386 and x86-64

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:20 -07:00
Matt Porter b2665f92ae [PATCH] ppc32: fix CONFIG_TASK_SIZE handling on 44x
This patch fixed CONFIG_TASK_SIZE handling on 44x.  Currently head_44x.S
hardcodes 0x80000000, which breaks if user chooses to change TASK_SIZE
(e.g.  for 3G user-space).  Tested on Ocotea in 3G/1G configuration.

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Kumar Gala 7f8cd80fb2 [PATCH] ppc32: Fix platform device initialization of 8250 serial ports
Initialization of 8250 serial ports that are platform devices require that
at empty entry exists in the array of plat_serial8250_port.  With out an
empty entry we can get some pretty random behavior.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Jeff Dike 84ddaa8c86 [PATCH] uml: Change printf to printk in console driver
From: Al Viro - we have error messages with KERN_ERR in them, so they
should be printk-ed rather than printf-ed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:19 -07:00
Jeff Dike 12f49643bc [PATCH] uml: fixrange_init 3-level page table support
From: Al Viro - add three-level page table support to fixrange_init.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 7b9014c1da [PATCH] uml: Remove ubd-mmap support
Finally rip out the ubd-mmap code, which turned out to be broken by design.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 9b67a3c4cd [PATCH] uml: initrd cleanup
The serial UML OS-abstraction layer patch (um/kernel dir).

This moves all systemcalls from initrd_user.c file under os-Linux dir and join
initrd_user.c and initrd_kern.c files in new file initrd.c

Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 41a9cf8ebe [PATCH] uml: Export clear_user_*
From: Oleg Drokin: This patch is needed to support kernel modules that want to
use clear_user() (that is exported symbol on all other architectures).

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:18 -07:00
Jeff Dike 7c00c31fc0 [PATCH] uml: multicast driver cleanup
Byte-swapping of the port and IP address passed in to the multicast driver by
the user used to happen in different places, which was a bug in itself.  The
port also was swapped before being printk-ed, which led to a misleading
message.  This patch moves the port swapping to the same place as the IP
address swapping.  It also cleans up the error paths of mcast_open.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike 060e352236 [PATCH] uml: Delay loop cleanups
This patch cleans up the delay implementations a bit, makes the loops
unoptimizable, and exports __udelay and __const_udelay.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike 13479d52c7 [PATCH] uml: Page fault fixes
Any access to a PROT_NONE page should segfault the process.  A JVM seems to do
this on purpose.  Also, Al noticed some bogus code, which is now deleted.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Jeff Dike ba9950c820 [PATCH] uml: small fixes left over from rc4
Some changes that I sent in didn't make 2.6.12-rc4 for some reason.  This
adds them back.  We have
	an x86_64 definition of TOP_ADDR
	a reimplementation of the x86_64 csum_partial_copy_from_user
	some syntax fixes in arch/um/kernel/ptrace.c
	removal of a CFLAGS definition in the x86_64 Makefile
	some include changes in the x86_64 ptrace.c and user-offsets.h
	a syntax fix in elf-x86_64.h
Also moved an include in the i386 and x86_64 Makefiles to make the symlinks
work, and some small fixes from Al Viro.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 15:48:17 -07:00
Linus Torvalds 1c7878f024 Remove some left-over empty files
Hopefully the addition of -E to my applypatch script
will mean that I won't have these kinds of leftovers
in the future.
2005-05-20 13:36:19 -07:00
David S. Miller a228dfd5dc [SPARC64]: Fix bad performance side effect of strbuf timeout changes.
The recent change to add a timeout to strbuf flushing had
a negative performance impact.  The udelay()'s are too long,
and they were done in the wrong order wrt. the register read
checks.  Fix both, and things are happy again.

There are more possible improvements in this area.  In fact,
PCI streaming buffer flushing seems to be part of the bottleneck
in network receive performance on my SunBlade1000 box.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-20 11:40:32 -07:00
Paul Mackerras 45fed46f5b [PATCH] ppx32: Fix uninitialized variable in set_preferred_console
This fixes an uninitialized variable warning in arch/ppc/kernel/setup.c,
and this time gcc is actually right, there is a path that could result
in offset being uninitialized.  Zero is a sane default in this instance.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 07:54:11 -07:00
Paul Mackerras 72480ef863 [PATCH] ppc32: Fix __copy_tofrom_user return value
Recently the __copy_tofrom_user routine was modified to avoid doing
prefetches past the end of the source array.  However, in doing so we
introduced a bug in that it now returns the wrong value for the number
of bytes not copied when a fault is encountered.  This fixes it to
return the correct number.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 07:54:10 -07:00
Paul Mackerras 3207a80a6e [PATCH] ppc32: remove unused computation
We are computing phys in the code below and never using.  This patch
takes out the redundant computation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 07:54:10 -07:00
Paul Mackerras 6c37a88c5b [PATCH] ppc32: don't call progress functions after boot
On ppc32, the platform code can supply a "progress" function that is
used to show progress through the boot.  These functions are usually
in an init section and so can't be called after the init pages are
freed.  Now that the cpu bringup code can be called after the system
is booted (for hotplug cpu) we can get the situation where the
progress function can be called after boot.  The simple fix is to set
the progress function pointer to NULL when the init pages are freed,
and that is what this patch does (note that all callers already check
whether the function pointer is NULL before trying to call it).

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-20 07:54:10 -07:00
Linus Torvalds 66e60f9251 Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git/ 2005-05-19 15:31:18 -07:00
Tony Luck fe12e25ebd [IA64] initialize spinlock pfm_alt_install_check
I applied the penultimate version of the perfmon patch, which didn't have
the initialization of the new spinlock that was added.

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-18 17:09:06 -07:00
Tony Luck 3d620cd755 Sync with Linus - rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-05-18 16:28:52 -07:00
Tony Luck a1ecf7f6e6 [IA64] alternate perfmon handler
Patch from Charles Spirakis

Some linux customers want to optimize their applications on the latest
hardware but are not yet willing to upgrade to the latest kernel. This
patch provides a way to plug in an alternate, basic, and GPL'ed PMU
subsystem to help with their monitoring needs or for specialty work. It
can also be used in case of serious unexpected bugs in perfmon. Mutual
exclusion between the two subsystems is guaranteed, hence no conflict
can arise from both subsystem being present.

Acked-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-18 16:14:30 -07:00
Russ Anderson 6872ec5489 [IS64-SGI] Set Altix error handling features
The 2.6 kernel has CPE error thresholding.
This patch lets SAL know of this error handling feature.
The changes are SN specific.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-17 13:53:21 -07:00
Russ Anderson bb68c12b40 [IA64-SGI] cpe interrupts are not being enabled.
acpi_request_vector() is called in ia64_mca_init() to get the cpe_vector.
The problem is that acpi_request_vector() looks in platform_intr_list[] to 
get the vector, but platform_intr_list[] is not initialized with a valid
vector until later (in sn_setup()).  Without a valid vector the code
defaults to polling mode.

This patch moves the call to acpi_request_vector() from ia64_mca_init()
to ia64_mca_late_init(), which is after platform_intr_list[] is initialized.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-17 12:52:43 -07:00
David Mosberger-Tang 02a017a9f3 [IA64] Correct convert_to_non_syscall()
convert_to_non_syscall() has the same problem that unwind_to_user()
used to have.  Fix it likewise.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-17 12:33:15 -07:00
Christoph Lameter ff0d2f90fd [PATCH] fix memory scribble in arch/i386/pci/fixup.c
The GET_INDEX() macro should use just the low three bits of the devfn,
otherwise we have a memory scribble in pcie_rootport_aspm_quirk that
overwrites ptype_all

Fix it to be more careful about its arguments while at it.

Acked by Dely Sy <dely.l.sy@intel.com>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 09:27:05 -07:00
Paul Mackerras 19bbdf0e51 [PATCH] ppc32: enable use of early_param
We need to call parse_early_param() early on to allow usage of
early_param() for command line parsing.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 09:27:05 -07:00
Tony Luck d0dac8082c Merge with linus 2005-05-17 09:10:20 -07:00
Christoph Hellwig 5418b6925c [PATCH] kill <asm/ioctl32.h>
These days <linux/ioctl32.h> handles everything, no need for an asm
header on just two architectures.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:21 -07:00
Nishanth Aravamudan 24d568ed1b [PATCH] alpha/osf_sys: use helper functions to convert between tv and jiffies
Use helper functions to convert between timeval structure and jiffies
rather than custom logic.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:21 -07:00
Yoichi Yuasa 3407c0fec3 [PATCH] mips: add resource management to pmu
This patch had added resource management to vr41xx's pmu.

Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:20 -07:00
Andi Kleen 59db2e6ed0 [PATCH] x86_64: Update defconfig
Update defconfig

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:17 -07:00
Andi Kleen 18a2b64712 [PATCH] x86_64: Don't assume BSP has ID 0 in new smp bootup
This patch removes the assumption that LAPIC entries contain the BSP as its
first entry.  This is a slight improvement to the temporary fix submitted by
Suresh Siddha.

- Removes assumption that LAPIC entries contain BSP first.

- Builds x86_acpiid_to_apicid[] and bios_cpu_apicid[] properly with BSP as
  first entry.

- Made maxcpus=1 boot on these systems.  Since the parsing earlier in
  arch/x86_64/kernel/mpparse.c stopped after maxcpus entries, other entries
  were not processed, this causes kernel not to boot on these systems.

TBD: x86_acpiid_to_apicid and bios_cpu_apicid[] seem to be exactly the
     same.  This could be removed, but might need more work to cleanup.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:16 -07:00
Andi Kleen 751521149a [PATCH] x86_64: Collected NMI watchdog fixes.
Collected NMI watchdog fixes.

- Fix call of check_nmi_watchdog

- Remove earlier move of check_nmi_watchdog to later.  It does not fix the
  race it was supposed to fix fully.

- Remove unused P6 definitions

- Add support for performance counter based watchdog on P4 systems.

  This allows to run it only once per second, which saves some CPU time.
  Previously it would run at 1000Hz, which was too much.

  Code ported from i386

  Make this the default on Intel systems.

- Use check_nmi_watchdog with local APIC based nmi

- Fix race in touch_nmi_watchdog

- Fix bug that caused incorrect performance counters to be programmed in a
  few cases on K8.

- Remove useless check for local APIC

- Use local_t and per_cpu variables for per CPU data.

- Keep other CPUs busy during check_nmi_watchdog to make sure they really
  tick when in lapic mode.

- Only check CPUs that are actually online.

- Various other fixes.

- Fix fallback path when MSRs are unimplemented

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:16 -07:00
Andi Kleen f3c5f5e7ee [PATCH] x86_64: Make vsyscall.c compile without CONFIG_SYSCTL
Originally from Matt Tolentino

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:16 -07:00
Suresh Siddha 376ec33fcb [PATCH] x86_64: Fix OEM hpet check
Use bitmap_zero instead of bitmap_empty to initialise cpu mask This makes it
actually run reliable instead of relying on stack state.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:16 -07:00
Andi Kleen 3b9ba4d5e2 [PATCH] x86_64: When checking vmalloc mappings don't use pte_page
The PTEs can point to ioremap mappings too, and these are often outside
mem_map.  The NUMA hash page lookup functions cannot handle out of bounds
accesses properly.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:15 -07:00
Andi Kleen f6b8d4778c [PATCH] x86_64: Fix canonical checking for segment registers in ptrace
Allowed user programs to set a non canonical segment base, which would cause
oopses in the kernel later.

Credit-to: Alexander Nyberg <alexn@dsv.su.se>

 For identifying and reporting this bug.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:15 -07:00
Andi Kleen d1099e8a18 [PATCH] x86_64: check if ptrace RIP is canonical
This works around an AMD Erratum.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:15 -07:00
Andi Kleen 312df5f1a1 [PATCH] x86_64: Add pmtimer support
There are unfortunately more and more multi processor Opteron systems which
don't have HPET timer support in the southbridge.  This covers in particular
Nvidia and VIA chipsets.  They also don't guarantee that the TSCs are
synchronized between CPUs; and especially with MP powernow the systems are
nearly unusable because the time gets very inconsistent between CPUs.

The timer code for x86-64 was originally written under the assumption that we
could fall back to the HPET timer on such systems.  But this doesn't work
there.

Another alternative is to use the ACPI PM timer as primary time source.  This
patch does that.  The kernel only uses PM timer when there is no other choice
because it has some disadvantages.

Ported over from i386.  It should be faster than the i386 version because I
dropped the "read three times" workaround, but is still considerable slower
than HPET and also does not work together with vsyscalls which have to be
disabled.

Cc: <mark.langsdorf@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:15 -07:00
Andi Kleen 0af2be0b72 [PATCH] x86_64: Remove unique APIC/IO-APIC ID check
It is unnecessary on modern Intel or AMD systems, and that is all we support
on x86-64

Also causes problems on various systems

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
Andi Kleen 622dcaf974 [PATCH] x86_64: Don't print the internal k8c+ flag in /proc/cpuinfo
It is not very useful to the user and more an kernel internal implementation
detail.  So hide it.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
Andi Kleen 2942283e97 [PATCH] x86_64: Remove x86_apicid field
Remove x86_apicid field

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
Andi Kleen dda50e716d [PATCH] x86_64: Update TSC sync algorithm
The new TSC sync algorithm recently submitted did not work too well.

The result was that some MP machines where the TSC came up of the BIOS very
unsynchronized and that did not have HPET support were nearly unusable because
the time would jump forwards and backwards between CPUs.

After a lot of research ;-) and some more prototypes I ended up with just
using the one from IA64 which looks best.  It has some internal self tuning
that should adapt to changing interconnect latencies.  It holds up in my tests
so far.

I believe it was originally written by David Mosberger, I just ported it over
to x86-64.  See the inline comment for a description.

This cleans up the code because it uses smp_call_function for syncing instead
of having custom hooks in SMP bootup.

Please note that the cycle numbers it outputs are too optimistic because they
do not take into account the latency of WRMSR and RDTSC, which can be hundreds
of cycles.  It seems to be able to sync a dual Opteron to 200-300 cycles,
which is probably good enough.

There is a timing window during AP bootup where interrupts can see
inconsistent time before the TSC is synced.  It is hard to avoid unfortunately
because we can only do the TSC sync after some setup, and we need to enable
interrupts before that.  I just ignored it for now.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
Andi Kleen 93ef70a217 [PATCH] x86_64: Don't look up struct page pointer of physical address in iounmap
It could be in a memory hole not mapped in mem_map and that causes the hash
lookup to go off to nirvana.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:14 -07:00
Andi Kleen a158608bf4 [PATCH] x86_64/i386: fix defaults for physical/core id in /proc/cpuinfo
Last round hopefully of cpu_core_id changes hopefully fow now:

- Always initialize cpu_core_id for all CPUs, even when no dual core setup
  is detected.  This prevents funny /proc/cpuinfo output

- Do the same with phys_proc_id[] even when no HyperThreading - dito.

- Use the CPU APIC-ID from CPUID 1 instead of the linux virtual CPU number
  to identify the core for AMD dual core setups.

Patch for i386/x86-64.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:13 -07:00
Andi Kleen 10ffdbb8d6 [PATCH] x86_64: Readd missing tests in entry.S
Cleans up the system exit call slightly and synchronizes with my tree again.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:13 -07:00
Andi Kleen ac6b931c44 [PATCH] x86_64: Reduce NMI watchdog stack usage
NR_CPUs can be quite big these days.  kmalloc the per CPU array instead of
putting it onto the stack

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:12 -07:00
Paolo 'Blaisorblade' Giarrusso 8f332287bc [PATCH] uml: change memcpy to memmove
Replace one memcpy() call with overlapping source and dest arguments with
one call to memmove(), to avoid data corruption.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-17 07:59:11 -07:00
Russell King 8711a1b902 [PATCH] ARM: Fix build error
Mainline kernels don't have VECTORS_HIGH nor COPYPAGE_MINICACHE yet.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-16 23:36:22 +01:00
Ben Dooks bfd4e0709f [PATCH] ARM: 2678/1: S3C2440 - cpu fixes, hdiv divisors and nand dev name
Patch from Ben Dooks

Fix the setting of hdiv when set to divide-by-2. Thanks to
Jeonghoon Yoon for pointing this out.
Change name of the NAND device to "s3c2440-nand" as it
is not similar enough to the "s3c2410-nand" device.

Signed-off-by: Ben Dooks
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-05-12 19:27:14 +01:00
Ben Dooks 4ad3a443c9 [PATCH] ARM: 2677/1: S3C2440 - UPLL frequency doubled
Patch from Ben Dooks

S3C2440 UPLL is the same as the S3C2410 UPLL, it is only the
MPLL which has an extra multiplication factor of 2 in the
multiplier.

Signed-off-by: Ben Dooks
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-05-12 19:27:13 +01:00
Nicolas Pitre 70489c88d0 [PATCH] ARM: 2680/1: refine TLS reg availability some more again
Patch from Nicolas Pitre

Not all ARMv6 processors implement the TLS register.

Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-05-12 19:27:12 +01:00
David S. Miller 4dbc30fb27 [SPARC64]: Add timeouts to streaming buffer synchronization.
If some hardware error occurs and the flush flag never updates,
we will hang forever in these routines.  Add a timeout, and
print out a diagnostic if it is reached.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-11 11:37:00 -07:00
David Mosberger-Tang bfd6859408 [IA64] Avoid .spillpsp directive in handcoded assembly
Some time ago, GAS was fixed to bring the .spillpsp directive in line
with the Intel assembler manual (there was some disagreement as to
whether or not there is a built-in 16-byte offset).  Unfortunately,
there are two places in the kernel where this directive is used in
handwritten assembly files and those of course relied on the "buggy"
behavior.  As a result, when using a "fixed" assembler, the kernel
picks up the UNaT bits from the wrong place (off by 16) and randomly
sets NaT bits on the scratch registers.  This can be noticed easily by
looking at a coredump and finding various scratch registers with
unexpected NaT values.  The patch below fixes this by using the
.spillsp directive instead, which works correctly no matter what
assembler is in use.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-10 13:52:00 -07:00
Nicolas Pitre fa4354359f [PATCH] ARM: 2663/2: I can't type
Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-05-10 17:36:29 +01:00
Russell King 8d802d28c2 [PATCH] ARM: Add V6 aliasing cache flush
Add cache flushing support for aliased V6 caches to
flush_dcache_page.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-10 17:31:43 +01:00
Russell King 08ee4e4c5f [PATCH] ARM: Use top_pmd for V6 copy/clear user_page
Remove needless page table walking for v6 page operations.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-10 17:30:47 +01:00
Russell King d2bab05ac1 [PATCH] ARM: Move copy/clear user_page locking into implementation
Move the locking for copy_user_page() and clear_user_page() into
the implementations which require locking.  For simple memcpy/
memset based implementations, the locking is extra overhead which
is not necessary, and prevents preemption occuring.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-10 14:23:01 +01:00
Russell King c4e1f6f6bf [PATCH] ARM: Add top_pmd, which points at the top-most page table
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-10 10:40:19 +01:00
Tony Luck a84f577017 Merge with /home/aegl/GIT/linus 2005-05-09 16:44:53 -07:00
Russell King 155bb14482 [PATCH] ARM: Add inline functions to find the pmd from virtual address
Add pmd_off() and pmd_off_k() to obtain the pmd pointer for a
virtual address, and use them throughout the mm initialisation.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-05-09 20:52:51 +01:00
David Mosberger-Tang 66302f211a [IA64] fix "section mismatch" compile-time-error
I noticed this typo when trying to compile a kernel which had
CONFIG_HOTPLUG turned off.  In that case, __devinit is no longer a
no-op and the compiler then detects a section-conflict.  Fix by using
__devinitdata instead of __devinit.

Same patch also submitted by Darren Williams to fix compilation error
using sim_defconfig (which has CONFIG_HOTPLUG=n).

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by:  Darren Williams <dsw@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-09 10:16:17 -07:00
Jeff Dike 2d58cc9a43 [PATCH] uml: x86_64 fixes
This fixes some x86_64 bugs -

- maybe_map returns -1 on error instead of 0, which is interpreted as
  physical address 0

- removed an include of ipc.h, which isn't needed

- fixed the calculation of signal frame location

- the signal delivery code is now immune to the stack expansion check

- added a missing include

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:31 -07:00
Bodo Stroesser 0f7e663dea [PATCH] uml: Fix process exit race
tt-mode closes switch_pipes in exit_thread_tt and kills processes in
switch_to_tt, if the exit_state is EXIT_DEAD or EXIT_ZOMBIE.

In very rare cases the exiting process can be scheduled out after having set
exit_state and closed switch_pipes (from release_task it calls proc_pid_flush,
which might sleep).  If this process is to be restarted, UML failes in
switch_to_tt with:

   write of switch_pipe failed, err = 9

We fix this by closing switch_pipes not in exit_thread_tt, but later in
release_thread_tt.  Additionally, we set switch_pipe[0] = 0 after closing.
switch_to_tt must not kill "from" process depending on its exit_state, but
must kill it after release_thread was processed only, so it examines
switch_pipe[0] for its decision.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
Bodo Stroesser b8bd0220c1 [PATCH] uml: S390 preparation, arch_align_stack
Only x86 and x86_64 use arch_align_stack(), all other subarches have:

 #define arch_align_stack(x) (x)

So, if this definition is found, UML's own arch_align_stack() should be
skipped.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
Bodo Stroesser 1f3be588b5 [PATCH] uml: Use CONFIG variable for address space size
tt/mem.c still uses hardcoded TOP for i386 instead of CONFIG_TOP_ADDR provided
by subarch's Kconfig_XXXX, which would be right.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
Jeff Dike 675dffc914 [PATCH] uml: Turn literal numbers into symbolic constants
So, there I was, looking at my own code, wondering what the magic setjmp
return values did.  This patch turns the constants that are used to make
requests of the initial thread into meaningful symbols.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
Jeff Dike 37f02b63bd [PATCH] uml: Makefile cleanup
This eliminates some stuff from arch/um/kernel/Makefile which refers to a
file which has long since been deleted.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
Jeff Dike ccfcd37cb6 [PATCH] uml: Eliminate unusable function
Eliminate the non-inline version of switch_mm, which can't be used,
considering the inline version in asm/mmu_context.h

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:29 -07:00
Bodo Stroesser 804c2415c9 [PATCH] uml: S390 preparation, save an extra register
s390 tt-mode needs to save not only syscall number, but an further register
also.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:29 -07:00
Bodo Stroesser 82c1c11bdd [PATCH] uml: S390 preparation, peekusr/pokeusr defined by subarch
s390 needs to change some parts of arch/um/kernel/ptrace.c.  Thus, the code
regarding PEEKUSER and POKEUSER are shifted to arch/um/sys-<subarch>/ptrace.c.

Also s390 debug registers need to be updated, when singlestepping is switched
on / off.  Thus, setting/resetting of singlestepping is centralized in the new
function set_singlestep(), which also inserts the macro
SUBARCH_SET_SINGLESTEP(mode), if defined.

Finally, s390 has the "ieee_instruction_pointer" in its
registers, which also is allowed to be read via

  ptrace( PTRACE_PEEKUSER, getpid(), PT_IEEE_IP, 0);

To implement this feature, sys_ptrace inserts the macro
SUBARCH_PTRACE_SPECIAL, if defined.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:29 -07:00
Jeff Dike 16c1116301 [PATCH] uml: command line handling cleanup
Command line handling cleanups - a couple of things made static and an
unused declaration removed from header.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:29 -07:00
Jeff Dike f2a0f8b930 [PATCH] uml: __deprecated makes build unnecessarily noisy
Remove the __deprecated from verify_area_skas and verify_area_tt.  Since
verify_area is itself marked __deprecated, and it is the only caller of
these, then they don't need to be marked.  Marking them only makes the
build noisier.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:28 -07:00
Kumar Gala b272125273 [PATCH] ppc32: Fix POWER3/POWER4 compiler error
In separating out support for hardware floating point we missed the fact
that both POWER3 and POWER4 have HW FP.  Enable CONFIG_PPC_FPU for POWER3
and POWER4 fixes the issue.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:28 -07:00
Paul Mackerras b7c2b704bd [PATCH] ppc64: enable CONFIG_RTAS_PROC by default
This patch enables CONFIG_RTAS_PROC by default on pSeries.  This will
preserve /proc/ppc64/rtas/rmo_buffer, which is needed by librtas.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:27 -07:00
Linus Torvalds 22490eb80c Fix acpi_find_rsdp() - acpi_scan_rsdp takes length, not end
Noticed by Jakub Jermar <jermar@itbs.cz>
2005-05-06 15:39:23 -07:00
David Mosberger-Tang 966dc11fcc [IA64] Fix stack placement when INIT hits in kernel mode.
Without this patch, the stack is placed _below_ the current task
structure, which is risky at best.

Tony, I think this patch needs to go into 2.6.12, since it fixes a
real bug.  Without it, INIT may case secondary errors, which would be
most unpleasant.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-06 10:16:07 -07:00
Paul Mackerras 6c80a21cb1 [PATCH] ppc64: global interrupt queue cleanup
Move the code to set global interrupt queue membership to xics.c,
and remove no longer needed extern declarations.  Also call it on
all cpus (even the boot cpu) to prepare for kexec.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: R Sharada <sharada@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 08:07:01 -07:00
Paul Mackerras 2512809255 [PATCH] ppc64: remove explicit contig_page_data reference
Trivial patch to remove our last direct reference to contig_page_data.
This will make it just that much less hard to seperate NUMA and
DISCONTIG.  Please forward on.  Against 2.6.12-rc1

Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 8b3447db2e [PATCH] ppc64: remove unused arch/ppc64/boot/start.c
start.c is not referenced in the arch/ppc64/boot/Makefile

compile tested with the defconfig.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras af4d4b3410 [PATCH] ppc64: remove asm/bootinfo.h include
The defines in bootinfo.h are not used, so the include can be removed.
According to Ben, birecs are not used on ppc64:

  on ppc64, we made the decision of enforcing the presence of an
  OF device-tree and either an OF-like client interface or a kexec
  like flattened tree.
  so if your bootloader want to say things to the kernel,
  it can do so by adding properties to the device-tree

compile-tested with defconfig

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 5e2afc1ddd [PATCH] ppc64: fix reloc_offset comment
The code in reloc_offset is actually subtracting the address in the link
register from the address calculated by the linker.  Perhaps the
extended mnemonic `sub' replaced an original `subf' and the comment just
did not get updated.

        bl      1f
1:      mflr    r3
        LOADADDR(r4,1b)
        sub     r3,r4,r3

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Paul Mackerras 3892c5fa94 [PATCH] ppc64: fix prom.c compile warning
The code in unflatten_device_tree knows that get_property is written to
only return with lenp equal to 1 when also returning a valid pointer.
The gcc 3.3.3 compiler is not able to prove this to itself, so it warns
about a possible uninitialized pointer dereference:

 .../arch/ppc64/kernel/prom.c: In function `unflatten_device_tree':
 .../arch/ppc64/kernel/prom.c:828:
 warning: `p' might be used uninitialized in this function

Unless it is desired to rework the interaction between the two
functions, this will keep the existing behavior but quiet the compiler.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 22:00:52 -07:00
Tobias Klauser 6741f3a7f9 [PATCH] arch/ppc64: Replace custom MIN macro
Replace a custom MIN() macro with the min() macro from kernel.h
This patch removes 4 lines of redundant code.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 19:32:59 -07:00
Kianusch Sayah Karadji 4713741955 [PATCH] x86: geode support fixes
- Changed Name/defines from "Geode GX" to "Geode GX1" for clarification

- Dropped "-march=i586" in favor of "-march=i486"

- Dopped X86_OOSTORE support for Geode GX1

Signed-off-by: Kianusch Sayah Karadji <kianusch@sk-tech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:49 -07:00
Domen Puncer 125947f2ab [PATCH] CodingStyle: trivial whitespace fixups
When I do a "diff -Nur arch/i386 arch/x86_64" to see what is different between these two
architectures, I see some differences due to whitespace issues only. The attached patch removes
some of the noise by fixing up the following files:
- arch/i386/boot/bootsect.S
- arch/i386/boot/video.S
- arch/x86_64/boot/bootsect.S

Signed-off-by: Daniel Dickman <didickman@yahoo.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:49 -07:00
maximilian attems a27e951f1e [PATCH] cyrix: eliminate bad section references
Fix cyrix section references:
 convert __initdata to __devinitdata.

Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000379
R_386_32          .init.data
Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 00000399
R_386_32          .init.data
Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b3
R_386_32          .init.data
Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003b9
R_386_32          .init.data
Error: ./arch/i386/kernel/cpu/mtrr/cyrix.o .text refers to 000003bf
R_386_32          .init.data

Signed-of-by: maximilian attems <janitor@sternwelten.at>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:47 -07:00
Prasanna S Panchamukhi 0b9e2cac8a [PATCH] Kprobes: Incorrect handling of probes on ret/lret instruction
Kprobes could not handle the insertion of a probe on the ret/lret
instruction and used to oops after single stepping since kprobes was
modifying eip/rip incorrectly.  Adjustment of eip/rip is not required after
single stepping in case of ret/lret instruction, because eip/rip points to
the correct location after execution of the ret/lret instruction.  This
patch fixes the above problem.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:39 -07:00
Bodo Stroesser 3a0a64e6c9 [PATCH] uml: header and code cleanup
Remove some definitions and declarations from arch/um/include/skas_ptrace.h,
as they have moved to arch/um/include/sysdep/skas_ptrace.h

Also, remove PTRACE_SIGPENDING support in UML at all.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:39 -07:00
Bodo Stroesser 7c5131a501 [PATCH] uml: remove a dangling symlink
UML: remove no longer needed arch-signal.h

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:38 -07:00
Bodo Stroesser 51a6b0c59a [PATCH] uml: s390 preparation, sighandler interface abstraction
s390 passes parameters in registers.  So the only safe way to find out the
address of signal context, error-address and error-type (trap_no), which are
passed to signal handlers as parameters, is to declare these parameters.

So I inserted an subarch-specific macro which holds the declaration of
parameters for signal handlers.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:38 -07:00
Bodo Stroesser 5fd861b682 [PATCH] uml: s390 preparation, delay moved to arch
s390 has fast read access to realtime clock (nanosecond resolution).  So it
makes sense to have an arch-specific implementation not only of __delay, but
__udelay also.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:38 -07:00
Bodo Stroesser 7d37c6d52f [PATCH] uml: s390 preparation, checksumming done in arch code
Checksum handling largely depends on the subarch.

Thus, I renamed i386 arch_csum_partial in arch/um/sys-i386/checksum.S back to
csum_partial, removed csum_partial from arch/um/kernel/checksum.c and shifted
EXPORT_SYMBOL(csum_partial) to arch/um/sys-i386/ksyms.c.

Then, csum_partial_copy_to and csum_partial_copy_from were shifted from
arch/um/kernel/checksum.c to arch/um/include/sysdep-i386/checksum.h and
inserted in the calling functions csum_partial_copy_from_user() and
csum_and_copy_to_user().

Now, arch/um/kernel/checksum.c is empty and removed.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:38 -07:00
Bodo Stroesser dbc35cc73f [PATCH] uml: s390 preparation, elf.h
This patch make elh.h a symlink to the new arch-specific include files of the
form elf-<subarch>.h, as in the same way already is done for some other
includes.  Also moves Elf-stuff from archparam-<subarch>.h and elf.h to the
new elf-<subarch>.h files.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:37 -07:00
Jeff Dike a0b8d32020 [PATCH] uml: inclusion cleanup
The completion cleanup got rid of some semaphores, but didn't remove the
inclusion of asm/semaphore.h from xterm_kern.c.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:37 -07:00
Jeff Dike 2ba491759f [PATCH] uml: tidy Makefile.rules
Just some breaking of some overly-long lines.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:36 -07:00
Jeff Dike cd2ee4a30c [PATCH] uml: Fix SIGWINCH relaying
This makes SIGWINCH work again, and fixes a couple of SIGWINCH-associated
crashes.  First, the sigio thread disables SIGWINCH because all hell breaks
loose if it ever gets one and tries to call the signal handling code.  Second,
there was a problem with deferencing tty structs after they were freed.  The
SIGWINCH support for a tty wasn't being turned off or freed after the tty went
away.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:36 -07:00
Bodo Stroesser c578455a3e [PATCH] uml: S390 preparation, abstract host page fault data
This patch removes the arch-specific fault/trap-infos from thread and
skas-regs.

It adds a new struct faultinfo, that is arch-specific defined in
sysdep/faultinfo.h.

The structure is inserted in thread.arch and thread.regs.skas and
thread.regs.tt

Now, segv and other trap-handlers can copy the contents from regs.X.faultinfo
to thread.arch.faultinfo with one simple assignment.

Also, the number of macros necessary is reduced to

FAULT_ADDRESS(struct faultinfo)
    extracts the faulting address from faultinfo

FAULT_WRITE(struct faultinfo)
    extracts the "is_write" flag

SEGV_IS_FIXABLE(struct faultinfo)
    is true for the fixable segvs, i.e. (TRAP == 14)
    on i386

UPT_FAULTINFO(regs)
    result is (struct faultinfo *) to the faultinfo
    in regs->skas.faultinfo

GET_FAULTINFO_FROM_SC(struct faultinfo, struct sigcontext *)
    copies the relevant parts of the sigcontext to
    struct faultinfo.

On SIGSEGV, call user_signal() instead of handle_segv(), if the architecture
provides the information needed in PTRACE_FAULTINFO, or if PTRACE_FAULTINFO is
missing, because segv-stub will provide the info.

The benefit of the change is, that in case of a non-fixable SIGSEGV, we can
give user processes a SIGSEGV, instead of possibly looping on pagefault
handling.

Since handle_segv() sikked arch_fixup() implicitly by passing ip==0 to segv(),
I changed segv() to call arch_fixup() only, if !is_user.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:36 -07:00
Jeff Dike ea66e8a3b6 [PATCH] uml: fix a ptrace call
This fixes write_ldt_entry to treat userspace_pid as an array.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:36 -07:00
Al Viro fd7aab9c1a [PATCH] uml: finish cross-build support
O=... builds support.  Very easy, actually.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:36 -07:00
Al Viro 04fe392378 [PATCH] uml: fix missing subdir in x86_64
make distclean et.al.  are missing arch/um/sys-x86_64/utils; fixed the same
way we have it done for sys-i386 counterpart.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:35 -07:00
Al Viro da998a2aec [PATCH] uml: cross-build support : mk_task and mk_constants
helpers in arch/um/util (mk_task and mk_constants) converted.  That's it -
none of the helpers depends on build and target being the same architecture
anymore.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:35 -07:00
Al Viro 2b8b611e9a [PATCH] uml: cross-build support : mk_thread
mk_thread converted

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:35 -07:00
Al Viro a31769ed3e [PATCH] uml: cross-build support : kernel_offsets
The next group of helpers is a bit trickier - they want the constants similar
to those in user-offsets.h, but we need target sc.h for it.  So we can't put
that into user-offsets (sc.h depends on it) and need the second generated
header for that stuff (kernel-offsets.h.  BFD...

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:35 -07:00
Al Viro 6bae32d395 [PATCH] uml: cross-build support: mk_sc
Ditto for mk_sc

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:34 -07:00
Al Viro 1cd3bc1c81 [PATCH] uml: cross-build support : mk_ptregs
mk_ptregs converted.  Nothing new here, it's the same situation as with
mk_user_constants.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:34 -07:00
Al Viro 8d0b9dc9be [PATCH] uml: start cross-build support : mk_user_constants
Beginning of cross-build fixes.  Instead of expecting that mk_user_constants
(compiled and executed on the build box) will see the sizeof, etc.  for target
box, we do what every architecture already does for asm-offsets.  Namely, have
user-offsets.c compiled *for* *target* into user-offsets.s and sed it into the
header with relevant constants.  We don't need to reinvent any wheels - all
tools are already there.

This patch deals with mk_user_constants.  It doesn't assume any relationship
between target and build environment anymore - we pick all defines we need
from user-offsets.h.  Later patches will deal with the rest of mk_...  helpers
in the same way.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:34 -07:00
Al Viro fcddd72e3e [PATCH] uml: use variables rather than symlinks in dependencies
Use explicit os-...  in make dependencies instead of playing with symlinks
(symlink in question is still created - it's needed for other things; however,
there's no reason to complicate ordering here).

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:34 -07:00
Al Viro 03f81dc50c [PATCH] uml: include the linker script rather than symlink it
Make vmlinux.lds.S include appopriate script instead of playing games with
symlinks.

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05 16:36:33 -07:00