Commit graph

281 commits

Author SHA1 Message Date
Kyle McMartin 01363220f5 [PARISC] clocksource: Move update_cr16_clocksource later in boot
smp_cpus_done is too early for us... before we even do a device
inventory! Move update_cr16_clocksource into the tail end of
processor_probe() and stub it out on CONFIG_SMP=n builds.

Verified that clocksource0 is properly updated to use jiffies
on an SMP build.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 22:21:22 -05:00
Kyle McMartin b2a8289a61 [PARISC] time: clocksource lost update_callback
So move the code to be called by smp_cpus_done, which is
after we've figured out if there's more than one cpu
actually present.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 21:24:56 -05:00
Kyle McMartin 87c8174727 [PARISC] time: Convert clocksource is_continuous to flag
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 20:15:18 -05:00
Kyle McMartin 00d1f3c31a [PARISC] clocksource_cr16: Use clocksource_change_rating()
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 20:10:42 -05:00
Kyle McMartin 0ff851e190 [PARISC] Remove __read_mostly annotation from command_line
Who cares if it's in the read mostly section when it's
going to be discarded anyway?

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 20:08:46 -05:00
Linus Torvalds b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
Guy Martin 2ed0e24359 [PARISC] Add missing statfs64 and fstatfs64 syscalls
Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
2007-02-21 15:33:59 +00:00
Robert P. J. Day 405ae7d381 Replace remaining references to "driverfs" with "sysfs".
Globally, s/driverfs/sysfs/g.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:13:42 +01:00
Carlos O'Donell Jr f6744bdd73 [PARISC] Compat signal fixes for 64-bit parisc
In copy_siginfo_from_user32:
Use compat_uptr_t. Use compat_ptr().

In copy_siginfo_to_user32:
Use compat_int_t. Use ptr_to_compat().

The sigevent_t structure has a 64-bit si_ptr field
that when copied to a 32-bit si_ptr will copy the wrong
word. For the compat copy use the si_int field instead.

Signed-off-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:22:00 -05:00
Carlos O'Donell Jr 1e67685b1b [PARISC] Reorder syscalls to match unistd.h
Move migrate_pages into the same position as specified
in unistd.h. This fixes migrate_pages, pselect6 and
ppoll syscalls.

Signed-off-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:21:56 -05:00
Kyle McMartin d104f11c39 [PARISC] fix sys_rt_sigqueueinfo
the parisc affecting portion of the patch was inadvertantly
reverted a while ago.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:19:59 -05:00
Helge Deller bcc0e04c5c [PARISC] do not export get_register/set_register
- noticed by Randolph Chung (tausq)

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:18:20 -05:00
Helge Deller 79793455eb [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:17:42 -05:00
Helge Deller a8f44e3889 [PARISC] use CONFIG_64BIT instead of __LP64__
- additionally update my copyright timestamps

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:16:40 -05:00
Helge Deller 0b3d643f9e [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
- this macro unifies the code to add exception table entries
- additionally use ENTRY()/ENDPROC() at more places

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:16:26 -05:00
Helge Deller 8e9e9844b4 [PARISC] more ENTRY(), ENDPROC(), END() conversions
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:16:12 -05:00
Helge Deller 2f75c12c66 [PARISC] Fixes /proc/cpuinfo cache output on B160L
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:15:16 -05:00
Helge Deller c5e7655297 [PARISC] implement standard ENTRY(), END() and ENDPROC()
Use the macros in entry.S

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:14:37 -05:00
Kyle McMartin 430a502abe [PARISC] kill ENTRY_SYS_CPUS
it's unlikely iCOD will ever happen on parisc-linux now... ;-)

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:11:41 -05:00
Kyle McMartin 5492a0f001 [PARISC] clean up debugging printks in smp.c
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:11:14 -05:00
Kyle McMartin 2b163b71e6 [PARISC] factor syscall_restart code out of do_signal
looks better this way... ;)

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:11:06 -05:00
Kyle McMartin a04b060538 [PARISC] display parisc device modalias in sysfs
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:08:09 -05:00
Helge Deller 3fe4c55ebc [PARISC] use less assembler statements in syscall path
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:06:32 -05:00
Kyle McMartin 4650f0a583 [PARISC] Add TIF_RESTORE_SIGMASK support
And unmask the pselect6/ppoll system calls.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:06:04 -05:00
Helge Deller 0bbdac0897 [PARISC] detect recursive kernel crash earlier
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:04:13 -05:00
Helge Deller 6e16d9409e [PARISC] Convert soft power switch driver to kthread
And remove it's reference in time.c.
Allow lcd_print() to take a const char *.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:03:43 -05:00
Helge Deller 324c7e6545 [PARISC] disable cr16 clocksource when multiple CPUs are online
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:02:47 -05:00
Helge Deller 12df29b64c [PARISC] GENERIC_TIME patchset for parisc
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:02:29 -05:00
Helge Deller df47b4386a [PARISC] a and b in "break a,b" message were swapped
And clean up 32/64bit branch assembler statements

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:00:56 -05:00
Kyle McMartin 0c2de3c6c4 [PARISC] use fls_long in irq.c
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 01:00:25 -05:00
Helge Deller 19dd705f4e [PARISC] add missing syscalls for vmsplice, move_pages, getcpu & epoll_pwait
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:57:56 -05:00
Helge Deller bd83bcffb2 [PARISC] dump stack backtrace on BUG() and add syslog-levels to printk()s
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:56:52 -05:00
Helge Deller 94a1981df0 [PARISC] whitespace cleanups and unify 32/64bit user-access assembler inlines
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:54:42 -05:00
Helge Deller 6891f8a113 [PARISC] Generic BUG
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:51:46 -05:00
Matthew Wilcox 9f15c82686 [PARISC] Fix show_stack() when we can't kmalloc
show_stack() was calling kzalloc() to allocate a struct pt_regs.
This meant that *really* early stack dumps would cause a null pointer
dereference.  x86_64 allocates its pt_regs on the stack, so do the same.

Kyle actually committed this exact patch to CVS on
Wed Jul 26 14:32:39 2006 UTC, and never moved it across to git.
Bad Kyle.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:51:25 -05:00
Matthew Wilcox e6fc0449be [PARISC] Remove sched.h from uaccess.h on parisc
Al Viro did this for x86-64 and reduced the number of dependencies on
sched.h significantly.  We had a couple of files which were relying on
uaccess.h pulling in sched.h, so they need explicit dependencies added.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:44:30 -05:00
Randolph Chung d6ce8626db [PARISC] Clean up the cache and tlb headers
No changes in functionality.

Signed-off-by: Randolph Chung <tausq@debian.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-17 00:41:30 -05:00
Kyle McMartin e7b3ca0854 Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
2007-02-17 00:18:23 -05:00
Arjan van de Ven 5dfe4c964a [PATCH] mark struct file_operations const 2
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

[akpm@osdl.org: sparc64 fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:44 -08:00
Alon Bar-Lev 7a3a06d0e1 [PATCH] Dynamic kernel command-line: fixups
Remove in-source externs, linux/init.h is included in all cases.
This is a fixups for "Dynamic kernel command-line" patch.

It also includes some uml __init fixups so that we can __initdata also its
command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:39 -08:00
Alon Bar-Lev 668f9931c8 [PATCH] Dynamic kernel command-line: parisc
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:38 -08:00
Kyle McMartin d4d23add3a [PATCH] Common compat_sys_sysinfo
I noticed that almost all architectures implemented exactly the same
sys32_sysinfo...  except parisc, where a bug was to be found in handling of
the uptime.  So let's remove a whole whack of code for fun and profit.
Cribbed compat_sys_sysinfo from x86_64's implementation, since I figured it
would be the best tested.

This patch incorporates Arnd's suggestion of not using set_fs/get_fs, but
instead extracting out the common code from sys_sysinfo.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
Alexey Dobriyan b035b6de24 [PATCH] Consolidate default sched_clock()
Use attribute(weak).

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jean-Paul Saman 67d38229df [PATCH] disable init/initramfs.c: architectures
Update all arch/*/kernel/vmlinux.lds.S to not include space for initramfs
when CONFIG_BLK_DEV_INITRAMFS is not selected.  This saves another 4 kbytes
on most platfoms (some reserve PAGE_SIZE for initramfs).

Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Christoph Lameter 005928374b [PATCH] optional ZONE_DMA: remove ZONE_DMA remains from parisc
Remove ZONE_DMA remains from parisc so that kernels are build without
ZONE_DMA.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:18 -08:00
Gautham R Shenoy b282b6f8a8 [PATCH] Change cpu_up and co from __devinit to __cpuinit
Compiling the kernel with CONFIG_HOTPLUG = y and CONFIG_HOTPLUG_CPU = n
with CONFIG_RELOCATABLE = y generates the following modpost warnings

WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b7d) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b9c) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.text:__cpu_up
from .text between '_cpu_up' (at offset 0xc0141bd8) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c05) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c26) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c37) and 'cpu_up'

This is because cpu_up, _cpu_up and __cpu_up (in some architectures) are
defined as __devinit
AND
__cpu_up calls some __cpuinit functions.

Since __cpuinit would map to __init with this kind of a configuration,
we get a .text refering .init.data warning.

This patch solves the problem by converting all of __cpu_up, _cpu_up
and cpu_up from __devinit to __cpuinit. The approach is justified since
the callers of cpu_up are either dependent on CONFIG_HOTPLUG_CPU or
are of __init type.

Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up
in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would
land up in .init section.

Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:20 -08:00
Robert P. J. Day 5cbded585d [PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this:

	#!/bin/sh
	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
	  echo "De-casting $f..."
	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
	done

And then go through and reinstate those cases where code is casting pointers
to non-pointers.

And then drop a few hunks which conflicted with outstanding work.

Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:58 -08:00
Kyle McMartin f41464fd84 [PARISC] Fix thinko in cpu_data.lock removal
Need to remove the initializer as well. Doh.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-12-11 21:03:44 -05:00
Haavard Skinnemoen e34067fdd2 [PATCH] Generic ioremap_page_range: parisc conversion
Convert parisc to use generic ioremap_page_range()

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:52 -08:00
David Howells f0d1b0b30d [PATCH] LOG2: Implement a general integer log2 facility in the kernel
This facility provides three entry points:

	ilog2()		Log base 2 of unsigned long
	ilog2_u32()	Log base 2 of u32
	ilog2_u64()	Log base 2 of u64

These facilities can either be used inside functions on dynamic data:

	int do_something(long q)
	{
		...;
		y = ilog2(x)
		...;
	}

Or can be used to statically initialise global variables with constant values:

	unsigned n = ilog2(27);

When performing static initialisation, the compiler will report "error:
initializer element is not constant" if asked to take a log of zero or of
something not reducible to a constant.  They treat negative numbers as
unsigned.

When not dealing with a constant, they fall back to using fls() which permits
them to use arch-specific log calculation instructions - such as BSR on
x86/x86_64 or SCAN on FRV - if available.

[akpm@osdl.org: MMC fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Howells <dhowells@redhat.com>
Cc: Wojtek Kaniewski <wojtekka@toxygen.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:51 -08:00