check_ivt had some seriously broken code wrt function pointers on
parisc64. Instead of referencing the hpmc code via a function pointer,
export symbols and reference it as a const array.
Thanks to jda for pointing out the broken 64-bit func ptr handling.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
The bug was that we were comparing __NR_syscalls to be greater or equal
to the syscall number stored in %r20. __NR_syscalls is one greater than
the last syscall though, so we're loading one entry beyond the end of the
syscall table, and trying to jump to it.
Fix this by only checking that we're greater, alternatively, we could
have compared to (__NR_Linux_syscalls - 1)
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
While debugging, I noticed we don't check the task_struct arg passed to
get_wchan, whereas everyone else does.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Amazingly, parisc was the only arch effected by this...
Convert register-sized loads/stores to always be 32-bit for these fields.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
commit ffb4512276 removed one too many args.
kallsyms_lookup is not safe to call with a NULL *modname. Paper bag over the
problem for the time being.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Kyle,
This patch removes remnants of softirq support that we no longer need.
I suspect this was just overlooked when willy convert parisc to generic
IRQ support.
Tested on c3600 32-bit UP.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
[and tested on a c8000 64-bit SMP --kyle]
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Wire up utimensat/signalfd/timerfd/eventfd syscalls and mark
select/fadvise64/utimes to be ignored by checksyscalls.sh
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Hi Kyle,
this patch fixes two section mismatches in arch/parisc/kernel:
WARNING: arch/parisc/kernel/built-in.o(.data.read_mostly+0xd8): Section mismatch: reference to .init.text:processor_probe (between 'cpu_driver' and 'boot_cpu_data')
WARNING: arch/parisc/kernel/built-in.o(.text.alloc_pa_dev+0x140): Section mismatch: reference to .init.text:parisc_hardware_description (after 'alloc_pa_dev')
Additionally, mark some tables as constants.
Please apply, Helge
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
The LWS debugging code on parisc is wrongly enabled due to a bug in the
use of the preprocessor directives. This debugging code is not thread
safe and causes problems with a recent glibc on SMP kernels.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
As side effect, remove one more ->get_info user and a novel approach of content
generation:
sprintf(buf, "%sfoo", buf, ...);
sprintf(buf, "%sbar", buf, ...);
...
Compile-tested.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Add VERIFY_WRITE check in the beginning like compat_sys_getdents() EFAULT on
parisc if put_user() fails.
Signed-off-by: Alexandr Andreev <aandreev@openvz.org>
Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <willy@debian.org>
Cc: Grant Grundler <grundler@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix:
mm/slab: fix section mismatch warning
mm: fix section mismatch warnings
init/main: use __init_refok to fix section mismatch
kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
all-archs: consolidate .data section definition in asm-generic
all-archs: consolidate .text section definition in asm-generic
kbuild: add "Section mismatch" warning whitelist for powerpc
kbuild: make better section mismatch reports on i386, arm and mips
kbuild: make modpost section warnings clearer
kconfig: search harder for curses library in check-lxdialog.sh
kbuild: include limits.h in sumversion.c for PATH_MAX
powerpc: Fix the MODALIAS generation in modpost for of devices
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] More verbose show_mem() like other architectures.
[S390] Make use of kretprobe_assert.
[S390] Wire up signald, timerfd and eventfd syscalls.
[S390] Wire up sys_utimensat.
[S390] cio: Update documentation.
cr4 is a 32-bit register, so casting the mask to an unsigned char is wrong,
as it clears more than the PGE bit.
Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The vsyscall time() function basically returns the second portion of
xtime directly. This however means that there is about a ticks worth of
time each second where time() will return a second value less then what
gettimeofday() does.
Additionally, this window where vtime() is behind vgettimeofday() grows
when dynticks is enabled, so its probably good to get this in before
dynticks lands.
Big thanks to Sripathi for noticing this issue and creating a test case
to work with!
This patch changes the vtime() implemenation to call vgettimeofday(),
much as syscall time() implementation calls gettimeofday().
2.6.21 stable candidate too
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
In
commit d358788f3f
Author: Russell King <rmk@dyn-67.arm.linux.org.uk>
Date: Mon Mar 20 20:00:09 2006 +0000
Glen Turner reported that writing LFCR rather than the more
traditional CRLF causes issues with some terminals.
Since this afflicts many serial drivers, extract the common code to a
library function (uart_console_write) and arrange for each driver to
supply a "putchar" function.
but early_printk is left out.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix boot failures with the early CPUID checking on VIA C3
Includes fixes from Christian Volkmann
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- boot/setup.S did not print "PANIC: CPU too old for this kernel"
( not visible, also the message did not match )
- I add "# missed before: set ds"
=> somebody should check if I am right with the way to set.
=> seems to be a generic error in setup.S not to set "ds" for error messages.
AK: extracted patch out of other changes
AK: also couldn't find any other case where ds is wrong
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It reports machine check capability in CPUID, but doesn't actually
implement all the necessary MSRs of the standard Intel machine
check architecture.
This fixes a boot failure on K6s recently introduced.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Only try to allocate MSRs once instead of for every CPU.
This assumes the MSRs are the same on all CPUs which is currently
true. P4-HT is a special case for different SMT threads, but the code
always saves/restores all MSRs so it works identical.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There's a forum thread at
https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&_forum_action=MessageReply&message_id=24741
which has a testcase involving signal handling that crashes quite readily.
Inspecting the code I believe what happens is that signal handling can become
confused when it is invoked on return from an interrupt, if the contents of
P0 and R0 at the time of the interrupt happen to be such that P0 is larger
than zero (indicating to the signal code that we're in a syscall), and R0
happens to have a value of something like -EINTR or -ERESTARTSYS.
Fixed by setting orig_p0 to -1 if we're returning from an interrupt. The
testcase now seems to run without problems.
Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Without conswitchp preset, we have the following situation:
- During initcalls: con_init is called, and returns because of
!display_desc.
- At this point there is no memory allocated for vc_cons[].d
A bit later vty_init calls kbd_init.
- From now on events are passed to kbd_event which will then call
kbd_keycode.
- kbd_keycode will oops on a NULL pointer dereference on vc->vc_tty
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
[ Added commit description based on email thread. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1) Disable Interrupts during DMA memcpy to avoid raise conditions.
2) Mark MDMA channel 0 as reserved, since were using it internally.
3) Add DMA based equivalents for insX and outsX.
4) Our insX and outsX only handles len <= 2^16.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>