Commit 54779e07 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

[PATCH] parisc updates for 2.5.56

Updates for 2.5.56:
 - Integrate Stephen Rothwell's compat code
 - OProfile support for Randolph Chung
 - Makefile updates from Sam Ravnborg
 - Regenerated defconfig as requested by Rusty
 - Generic device model updates (James Bottomley)
 - And lots of general updating bugfixing, etc.
parent 6977f04f
...@@ -107,6 +107,11 @@ config PARISC64 ...@@ -107,6 +107,11 @@ config PARISC64
enable this option otherwise. The 64bit kernel is significantly bigger enable this option otherwise. The 64bit kernel is significantly bigger
and slower than the 32bit one. and slower than the 32bit one.
config COMPAT
bool
depends on PARISC64
default y
config PDC_NARROW config PDC_NARROW
bool "32-bit firmware" bool "32-bit firmware"
depends on PARISC64 depends on PARISC64
...@@ -337,6 +342,8 @@ source "drivers/usb/Kconfig" ...@@ -337,6 +342,8 @@ source "drivers/usb/Kconfig"
source "net/bluetooth/Kconfig" source "net/bluetooth/Kconfig"
source "arch/parisc/oprofile/Kconfig"
menu "Kernel hacking" menu "Kernel hacking"
config DEBUG_KERNEL config DEBUG_KERNEL
......
...@@ -18,69 +18,51 @@ ...@@ -18,69 +18,51 @@
# #
ifdef CONFIG_PARISC64 ifdef CONFIG_PARISC64
CROSS_COMPILE := hppa64-linux- CROSS_COMPILE := hppa64-linux-
UTS_MACHINE := parisc64 UTS_MACHINE := parisc64
LDFLAGS_BLOB := --format binary --oformat elf64-hppa-linux LDFLAGS_BLOB := --format binary --oformat elf64-hppa-linux
else else
MACHINE := $(subst 64,,$(shell uname -m)) MACHINE := $(subst 64,,$(shell uname -m))
ifneq (${MACHINE},parisc) ifneq ($(MACHINE),parisc)
# cross compilation CROSS_COMPILE := hppa-linux-
CROSS_COMPILE := hppa-linux-
endif endif
LDFLAGS_BLOB := --format binary --oformat elf32-hppa-linux LDFLAGS_BLOB := --format binary --oformat elf32-hppa-linux
endif endif
FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
CFLAGS_PIPE := -pipe cflags-y := -D__linux__ -pipe -fno-strength-reduce
CFLAGS_NSR := -fno-strength-reduce
CFLAGS := $(CFLAGS) -D__linux__ $(CFLAGS_PIPE) $(CFLAGS_NSR)
# These should be on for older toolchains or SOM toolchains that don't # These should be on for older toolchains or SOM toolchains that don't
# enable them by default. # enable them by default.
CFLAGS += -mno-space-regs -mfast-indirect-calls cflags-y += -mno-space-regs -mfast-indirect-calls
# No fixed-point multiply # No fixed-point multiply
CFLAGS += -mdisable-fpregs cflags-y += -mdisable-fpregs
# Without this, "ld -r" results in .text sections that are too big # Without this, "ld -r" results in .text sections that are too big
# (> 0x40000) for branches to reach stubs. # (> 0x40000) for branches to reach stubs.
CFLAGS += -ffunction-sections cflags-y += -ffunction-sections
# select which processor to optimise for # select which processor to optimise for
ifdef CONFIG_PA7100 cflags-$(CONFIG_PA7100) += -march=1.1 -mschedule=7100
CFLAGS += -march=1.1 -mschedule=7100 cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
endif cflags-$(CONFIG_PA7100LC) += -march=1.1 -mschedule=7100LC
cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
ifdef CONFIG_PA7200
CFLAGS += -march=1.1 -mschedule=7200
endif
ifdef CONFIG_PA7100LC head-y := arch/parisc/kernel/head.o
CFLAGS += -march=1.1 -mschedule=7100LC head-$(CONFIG_PARISC64) := arch/parisc/kernel/head64.o
endif
ifdef CONFIG_PA8X00 CFLAGS += $(cflags-y)
CFLAGS += -march=2.0 -mschedule=8000 HEAD := $(head-y)
endif
HEAD := arch/parisc/kernel/head.o core-y += $(addprefix arch/parisc/, kernel/pdc_cons.o kernel/process.o \
ifdef CONFIG_PARISC64 mm/ kernel/ hpux/ math-emu/ kernel/init_task.o )
HEAD := arch/parisc/kernel/head64.o libs-y += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
endif
core-y += arch/parisc/kernel/pdc_cons.o \ drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/
arch/parisc/kernel/process.o \
arch/parisc/mm/ \
arch/parisc/kernel/ \
arch/parisc/hpux/ \
arch/parisc/math-emu/ \
arch/parisc/kernel/init_task.o
libs-y += arch/parisc/lib/ \
`$(CC) -print-libgcc-file-name`
palo: vmlinux palo: vmlinux
@if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \ @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
...@@ -101,33 +83,26 @@ oldpalo: vmlinux ...@@ -101,33 +83,26 @@ oldpalo: vmlinux
export TOPDIR=`pwd`; \ export TOPDIR=`pwd`; \
unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
Image: palo # Shorthands for known targets not supported by parisc, use palo as default
Image zImage bzImage: palo
Image-clean:
ramdisk.o:
zImage: palo
bzImage: palo
compressed: zImage prepare: include/asm-parisc/offsets.h
install: arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
archmrproper:
archclean:
prepare: include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
@echo -n ' Generating $@' @echo -n ' Generating $@'
@$(generate-asm-offsets.h) < $< > $@.tmp
@$(update-if-changed) @$(update-if-changed)
archclean:
archmrproper:
CLEAN_FILES += palo.conf lifimage include/asm-parisc/offsets.h \
include/asm-parisc/offsets.h.tmp
define archhelp
@echo '* vmlinux - Uncompressed kernel image (./vmlinux)'
@echo ' palo - Bootable image (./lifimage)'
endef
This diff is collapsed.
...@@ -131,9 +131,9 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) ...@@ -131,9 +131,9 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
tmp.st_gid = stat->gid; tmp.st_gid = stat->gid;
tmp.st_rdev = stat->rdev; tmp.st_rdev = stat->rdev;
tmp.st_size = stat->size; tmp.st_size = stat->size;
tmp.st_atime = stat->atime; tmp.st_atime = stat->atime.tv_sec;
tmp.st_mtime = stat->mtime; tmp.st_mtime = stat->mtime.tv_sec;
tmp.st_ctime = stat->ctime; tmp.st_ctime = stat->ctime.tv_sec;
tmp.st_blocks = stat->blocks; tmp.st_blocks = stat->blocks;
tmp.st_blksize = stat->blksize; tmp.st_blksize = stat->blksize;
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
......
...@@ -2,16 +2,14 @@ ...@@ -2,16 +2,14 @@
# Makefile for arch/parisc/kernel # Makefile for arch/parisc/kernel
# #
ifdef CONFIG_PARISC64 head-y := head.o
EXTRA_TARGETS := init_task.o pdc_cons.o process.o head64.o unaligned.o perf.o perf_asm.o head-$(CONFIG_PARISC64) := head64.o
else EXTRA_TARGETS := init_task.o pdc_cons.o process.o unaligned.o $(head-y)
EXTRA_TARGETS := init_task.o pdc_cons.o process.o head.o unaligned.o
endif
AFLAGS_entry.o := -traditional AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional AFLAGS_pacache.o := -traditional
export-objs := parisc_ksyms.o export-objs := parisc_ksyms.o
obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
...@@ -19,10 +17,11 @@ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ ...@@ -19,10 +17,11 @@ obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \
signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \ signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
processor.o pdc_chassis.o processor.o pdc_chassis.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PA11) += pci-dma.o obj-$(CONFIG_PROFILING) += profile.o
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PA11) += pci-dma.o
obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \ obj-$(CONFIG_PCI) += pci.o
ioctl32.o signal32.o obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o ioctl32.o signal32.o
# only supported for PCX-W/U in 64-bit mode at the moment # only supported for PCX-W/U in 64-bit mode at the moment
obj-$(CONFIG_PARISC64) += perf.o perf_asm.o obj-$(CONFIG_PARISC64) += perf.o perf_asm.o
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
int main(void) int main(void)
{ {
DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info));
DEFINE(TASK_STATE, offsetof(struct task_struct, state)); DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
...@@ -213,6 +214,7 @@ int main(void) ...@@ -213,6 +214,7 @@ int main(void)
DEFINE(PT_SIZE, sizeof(struct pt_regs)); DEFINE(PT_SIZE, sizeof(struct pt_regs));
DEFINE(PT_SZ_ALGN, align(sizeof(struct pt_regs), 64)); DEFINE(PT_SZ_ALGN, align(sizeof(struct pt_regs), 64));
BLANK(); BLANK();
DEFINE(TI_TASK, offsetof(struct thread_info, task));
DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain)); DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain));
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
......
...@@ -19,7 +19,7 @@ typedef unsigned int elf_greg_t; ...@@ -19,7 +19,7 @@ typedef unsigned int elf_greg_t;
#include <linux/module.h> #include <linux/module.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/elfcore.h> #include <linux/elfcore.h>
#include "sys32.h" /* struct timeval32 */ #include <linux/compat.h>
#define elf_prstatus elf_prstatus32 #define elf_prstatus elf_prstatus32
struct elf_prstatus32 struct elf_prstatus32
...@@ -32,10 +32,10 @@ struct elf_prstatus32 ...@@ -32,10 +32,10 @@ struct elf_prstatus32
pid_t pr_ppid; pid_t pr_ppid;
pid_t pr_pgrp; pid_t pr_pgrp;
pid_t pr_sid; pid_t pr_sid;
struct timeval32 pr_utime; /* User time */ struct compat_timeval pr_utime; /* User time */
struct timeval32 pr_stime; /* System time */ struct compat_timeval pr_stime; /* System time */
struct timeval32 pr_cutime; /* Cumulative user time */ struct compat_timeval pr_cutime; /* Cumulative user time */
struct timeval32 pr_cstime; /* Cumulative system time */ struct compat_timeval pr_cstime; /* Cumulative system time */
elf_gregset_t pr_reg; /* GP registers */ elf_gregset_t pr_reg; /* GP registers */
int pr_fpvalid; /* True if math co-processor being used. */ int pr_fpvalid; /* True if math co-processor being used. */
}; };
...@@ -89,4 +89,12 @@ struct elf_prpsinfo32 ...@@ -89,4 +89,12 @@ struct elf_prpsinfo32
#define SET_PERSONALITY(ex, ibcs2) \ #define SET_PERSONALITY(ex, ibcs2) \
current->personality = PER_LINUX_32BIT current->personality = PER_LINUX_32BIT
#define jiffies_to_timeval jiffies_to_compat_timeval
static __inline__ void
jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
{
value->tv_usec = (jiffies % HZ) * (1000000L / HZ);
value->tv_sec = jiffies / HZ;
}
#include "../../../fs/binfmt_elf.c" #include "../../../fs/binfmt_elf.c"
This diff is collapsed.
...@@ -38,13 +38,11 @@ ...@@ -38,13 +38,11 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#ifdef __LP64__ #ifdef __LP64__
#define FRAME_SIZE 128
#define CMPIB cmpib,* #define CMPIB cmpib,*
#define CMPB cmpb,* #define CMPB cmpb,*
.level 2.0w .level 2.0w
#else #else
#define FRAME_SIZE 64
#define CMPIB cmpib, #define CMPIB cmpib,
#define CMPB cmpb, #define CMPB cmpb,
...@@ -147,7 +145,7 @@ ...@@ -147,7 +145,7 @@
mfctl %cr30, %r1 mfctl %cr30, %r1
tophys %r1,%r9 tophys %r1,%r9
LDREG 0(%r9), %r1 /* thread_info -> task_struct */ LDREG TI_TASK(%r9), %r1 /* thread_info -> task_struct */
tophys %r1,%r9 tophys %r1,%r9
ldo TASK_REGS(%r9),%r9 ldo TASK_REGS(%r9),%r9
STREG %r30, PT_GR30(%r9) STREG %r30, PT_GR30(%r9)
...@@ -499,9 +497,7 @@ fault_vector_11: ...@@ -499,9 +497,7 @@ fault_vector_11:
#endif #endif
.import handle_interruption,code .import handle_interruption,code
.import handle_real_interruption,code
.import do_cpu_irq_mask,code .import do_cpu_irq_mask,code
.import parisc_stopkernel,code
/* /*
* r26 = function to be called * r26 = function to be called
...@@ -529,7 +525,7 @@ __kernel_thread: ...@@ -529,7 +525,7 @@ __kernel_thread:
STREG %r2, PT_GR27(%r1) /* Store childs %dp */ STREG %r2, PT_GR27(%r1) /* Store childs %dp */
ldd 16(%r26), %r26 ldd 16(%r26), %r26
STREG %r22, PT_GR22(%r1) /* Store childs %dp */ STREG %r22, PT_GR22(%r1) /* save r22 (arg5) */
copy %r0, %r22 /* user_tid */ copy %r0, %r22 /* user_tid */
#endif #endif
STREG %r26, PT_GR26(%r1) /* Store function & argument for child */ STREG %r26, PT_GR26(%r1) /* Store function & argument for child */
...@@ -568,7 +564,7 @@ ret_from_kernel_thread: ...@@ -568,7 +564,7 @@ ret_from_kernel_thread:
nop nop
#endif #endif
LDREG -THREAD_SZ_ALGN(%r30), %r1 LDREG TI_TASK-THREAD_SZ_ALGN(%r30), %r1
LDREG TASK_PT_GR25(%r1), %r26 LDREG TASK_PT_GR25(%r1), %r26
#ifdef __LP64__ #ifdef __LP64__
LDREG TASK_PT_GR27(%r1), %r27 LDREG TASK_PT_GR27(%r1), %r27
...@@ -629,11 +625,7 @@ _switch_to: ...@@ -629,11 +625,7 @@ _switch_to:
STREG %r30, TASK_PT_KSP(%r26) STREG %r30, TASK_PT_KSP(%r26)
LDREG TASK_PT_KSP(%r25), %r30 LDREG TASK_PT_KSP(%r25), %r30
#ifdef __LP64__ LDREG TASK_THREAD_INFO(%r25), %r25
LDREG 8(%r25), %r25
#else
LDREG 4(%r25), %r25
#endif
bv %r0(%r2) bv %r0(%r2)
mtctl %r25,%cr30 mtctl %r25,%cr30
...@@ -667,7 +659,7 @@ _switch_to_ret: ...@@ -667,7 +659,7 @@ _switch_to_ret:
.export syscall_exit_rfi .export syscall_exit_rfi
syscall_exit_rfi: syscall_exit_rfi:
mfctl %cr30,%r16 mfctl %cr30,%r16
LDREG 0(%r16), %r16 /* thread_info -> task_struct */ LDREG TI_TASK(%r16), %r16 /* thread_info -> task_struct */
ldo TASK_REGS(%r16),%r16 ldo TASK_REGS(%r16),%r16
/* Force iaoq to userspace, as the user has had access to our current /* Force iaoq to userspace, as the user has had access to our current
* context via sigcontext. Also Filter the PSW for the same reason. * context via sigcontext. Also Filter the PSW for the same reason.
...@@ -824,8 +816,6 @@ intr_do_signal: ...@@ -824,8 +816,6 @@ intr_do_signal:
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
#warning TAUSQ FIXME - review 2.5 signal return path changes
bl do_signal,%r2 bl do_signal,%r2
copy %r0, %r26 /* sigset_t *oldset = NULL */ copy %r0, %r26 /* sigset_t *oldset = NULL */
...@@ -954,11 +944,11 @@ skip_save_ior: ...@@ -954,11 +944,11 @@ skip_save_ior:
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
ldil L%intr_restore, %r2 ldil L%intr_check_sig, %r2
copy %r25, %r16 /* save pt_regs */ copy %r25, %r16 /* save pt_regs */
b handle_interruption b handle_interruption
ldo R%intr_restore(%r2), %r2 ldo R%intr_check_sig(%r2), %r2
/* /*
...@@ -1985,8 +1975,7 @@ dtlb_fault: ...@@ -1985,8 +1975,7 @@ dtlb_fault:
.export sys_fork_wrapper .export sys_fork_wrapper
.export child_return .export child_return
sys_fork_wrapper: sys_fork_wrapper:
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
LDREG 0(%r1),%r1
ldo TASK_REGS(%r1),%r1 ldo TASK_REGS(%r1),%r1
reg_save %r1 reg_save %r1
mfctl %cr27, %r3 mfctl %cr27, %r3
...@@ -2011,9 +2000,8 @@ sys_fork_wrapper: ...@@ -2011,9 +2000,8 @@ sys_fork_wrapper:
LDREG -RP_OFFSET-FRAME_SIZE(%r30),%r2 LDREG -RP_OFFSET-FRAME_SIZE(%r30),%r2
wrapper_exit: wrapper_exit:
ldo -FRAME_SIZE(%r30),%r30 /* get the stackframe */ ldo -FRAME_SIZE(%r30),%r30 /* get the stackframe */
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1 ldo TASK_REGS(%r1),%r1 /* get pt regs */
ldo TASK_REGS(%r1),%r1
LDREG PT_CR27(%r1), %r3 LDREG PT_CR27(%r1), %r3
mtctl %r3, %cr27 mtctl %r3, %cr27
...@@ -2031,18 +2019,16 @@ child_return: ...@@ -2031,18 +2019,16 @@ child_return:
nop nop
#endif #endif
mfctl %cr30,%r2 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30), %r1
LDREG 0(%r2),%r2 LDREG TASK_PT_GR19(%r1),%r2
LDREG TASK_PT_GR19(%r2),%r2
b wrapper_exit b wrapper_exit
copy %r0,%r28 copy %r0,%r28
.export sys_clone_wrapper .export sys_clone_wrapper
sys_clone_wrapper: sys_clone_wrapper:
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1 ldo TASK_REGS(%r1),%r1 /* get pt regs */
ldo TASK_REGS(%r1),%r1
reg_save %r1 reg_save %r1
mfctl %cr27, %r3 mfctl %cr27, %r3
STREG %r3, PT_CR27(%r1) STREG %r3, PT_CR27(%r1)
...@@ -2063,9 +2049,8 @@ sys_clone_wrapper: ...@@ -2063,9 +2049,8 @@ sys_clone_wrapper:
.export sys_vfork_wrapper .export sys_vfork_wrapper
sys_vfork_wrapper: sys_vfork_wrapper:
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1 ldo TASK_REGS(%r1),%r1 /* get pt regs */
ldo TASK_REGS(%r1),%r1
reg_save %r1 reg_save %r1
mfctl %cr27, %r3 mfctl %cr27, %r3
STREG %r3, PT_CR27(%r1) STREG %r3, PT_CR27(%r1)
...@@ -2087,9 +2072,8 @@ sys_vfork_wrapper: ...@@ -2087,9 +2072,8 @@ sys_vfork_wrapper:
.macro execve_wrapper execve .macro execve_wrapper execve
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1 ldo TASK_REGS(%r1),%r1 /* get pt regs */
ldo TASK_REGS(%r1),%r1
/* /*
* Do we need to save/restore r3-r18 here? * Do we need to save/restore r3-r18 here?
...@@ -2137,9 +2121,8 @@ sys32_execve_wrapper: ...@@ -2137,9 +2121,8 @@ sys32_execve_wrapper:
.export sys_rt_sigreturn_wrapper .export sys_rt_sigreturn_wrapper
sys_rt_sigreturn_wrapper: sys_rt_sigreturn_wrapper:
mfctl %cr30,%r26 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26
LDREG 0(%r26),%r26 ldo TASK_REGS(%r26),%r26 /* get pt regs */
ldo TASK_REGS(%r26),%r26
/* Don't save regs, we are going to restore them from sigcontext. */ /* Don't save regs, we are going to restore them from sigcontext. */
STREG %r2, -RP_OFFSET(%r30) STREG %r2, -RP_OFFSET(%r30)
#ifdef __LP64__ #ifdef __LP64__
...@@ -2155,9 +2138,8 @@ sys_rt_sigreturn_wrapper: ...@@ -2155,9 +2138,8 @@ sys_rt_sigreturn_wrapper:
LDREG -RP_OFFSET(%r30), %r2 LDREG -RP_OFFSET(%r30), %r2
/* FIXME: I think we need to restore a few more things here. */ /* FIXME: I think we need to restore a few more things here. */
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1 ldo TASK_REGS(%r1),%r1 /* get pt regs */
ldo TASK_REGS(%r1),%r1
reg_restore %r1 reg_restore %r1
/* If the signal was received while the process was blocked on a /* If the signal was received while the process was blocked on a
...@@ -2170,8 +2152,8 @@ sys_rt_sigreturn_wrapper: ...@@ -2170,8 +2152,8 @@ sys_rt_sigreturn_wrapper:
.export sys_sigaltstack_wrapper .export sys_sigaltstack_wrapper
sys_sigaltstack_wrapper: sys_sigaltstack_wrapper:
/* Get the user stack pointer */ /* Get the user stack pointer */
mfctl %cr30,%r24 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r24),%r24 ldo TASK_REGS(%r1),%r24 /* get pt regs */
LDREG TASK_PT_GR30(%r24),%r24 LDREG TASK_PT_GR30(%r24),%r24
STREG %r2, -RP_OFFSET(%r30) STREG %r2, -RP_OFFSET(%r30)
#ifdef __LP64__ #ifdef __LP64__
...@@ -2192,8 +2174,7 @@ sys_sigaltstack_wrapper: ...@@ -2192,8 +2174,7 @@ sys_sigaltstack_wrapper:
.export sys32_sigaltstack_wrapper .export sys32_sigaltstack_wrapper
sys32_sigaltstack_wrapper: sys32_sigaltstack_wrapper:
/* Get the user stack pointer */ /* Get the user stack pointer */
mfctl %cr30,%r24 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r24
LDREG 0(%r24),%r24
LDREG TASK_PT_GR30(%r24),%r24 LDREG TASK_PT_GR30(%r24),%r24
STREG %r2, -RP_OFFSET(%r30) STREG %r2, -RP_OFFSET(%r30)
ldo FRAME_SIZE(%r30), %r30 ldo FRAME_SIZE(%r30), %r30
...@@ -2208,9 +2189,8 @@ sys32_sigaltstack_wrapper: ...@@ -2208,9 +2189,8 @@ sys32_sigaltstack_wrapper:
.export sys_rt_sigsuspend_wrapper .export sys_rt_sigsuspend_wrapper
sys_rt_sigsuspend_wrapper: sys_rt_sigsuspend_wrapper:
mfctl %cr30,%r24 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
LDREG 0(%r24),%r24 ldo TASK_REGS(%r1),%r24
ldo TASK_REGS(%r24),%r24
reg_save %r24 reg_save %r24
STREG %r2, -RP_OFFSET(%r30) STREG %r2, -RP_OFFSET(%r30)
...@@ -2226,8 +2206,7 @@ sys_rt_sigsuspend_wrapper: ...@@ -2226,8 +2206,7 @@ sys_rt_sigsuspend_wrapper:
ldo -FRAME_SIZE(%r30), %r30 ldo -FRAME_SIZE(%r30), %r30
LDREG -RP_OFFSET(%r30), %r2 LDREG -RP_OFFSET(%r30), %r2
mfctl %cr30,%r1 /* get pt regs */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
LDREG 0(%r1),%r1
ldo TASK_REGS(%r1),%r1 ldo TASK_REGS(%r1),%r1
reg_restore %r1 reg_restore %r1
...@@ -2247,7 +2226,7 @@ syscall_exit: ...@@ -2247,7 +2226,7 @@ syscall_exit:
/* save return value now */ /* save return value now */
mfctl %cr30, %r1 mfctl %cr30, %r1
LDREG 0(%r1),%r1 LDREG TI_TASK(%r1),%r1
STREG %r28,TASK_PT_GR28(%r1) STREG %r28,TASK_PT_GR28(%r1)
/* Save other hpux returns if personality is PER_HPUX */ /* Save other hpux returns if personality is PER_HPUX */
...@@ -2297,25 +2276,17 @@ syscall_check_resched: ...@@ -2297,25 +2276,17 @@ syscall_check_resched:
/* check for reschedule */ /* check for reschedule */
LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */ LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* long */
bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */ bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */
syscall_check_sig: syscall_check_sig:
/* These should be the same effect, but which is faster? */ LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* get ti flags */
#if 1 bb,<,n %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
mfctl %cr30,%r1
#else
ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get thread info ptr */
#endif
/* check for pending signals */
LDREG TI_FLAGS(%r1),%r19
bb,<,n %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
syscall_restore: syscall_restore:
mfctl %cr30,%r1 LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 /* get ti flags */
LDREG TI_FLAGS(%r1), %r19 /* Are we being ptraced? */
bb,< %r19, 31-TIF_SYSCALL_TRACE,syscall_restore_rfi bb,< %r19, 31-TIF_SYSCALL_TRACE,syscall_restore_rfi
LDREG 0(%r1),%r1 /* delay slot! */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* delay slot! */
ldo TASK_PT_FR31(%r1),%r19 /* reload fpregs */ ldo TASK_PT_FR31(%r1),%r19 /* reload fpregs */
rest_fp %r19 rest_fp %r19
...@@ -2444,7 +2415,7 @@ syscall_do_signal: ...@@ -2444,7 +2415,7 @@ syscall_do_signal:
FIXME: After this point the process structure should be FIXME: After this point the process structure should be
consistent with all the relevant state of the process consistent with all the relevant state of the process
before the syscall. We need to verify this. */ before the syscall. We need to verify this. */
LDREG 0(%r1),%r1 LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
ldo TASK_REGS(%r1), %r25 /* struct pt_regs *regs */ ldo TASK_REGS(%r1), %r25 /* struct pt_regs *regs */
reg_save %r25 reg_save %r25
...@@ -2453,12 +2424,10 @@ syscall_do_signal: ...@@ -2453,12 +2424,10 @@ syscall_do_signal:
#ifdef __LP64__ #ifdef __LP64__
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
#warning TAUSQ FIXME, this is wrong
bl do_signal,%r2 bl do_signal,%r2
copy %r0, %r26 /* sigset_t *oldset = NULL */ copy %r0, %r26 /* sigset_t *oldset = NULL */
mfctl %cr30,%r1 /* reload task ptr */ LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
LDREG 0(%r1),%r1
ldo TASK_REGS(%r1), %r20 /* reload pt_regs */ ldo TASK_REGS(%r1), %r20 /* reload pt_regs */
reg_restore %r20 reg_restore %r20
......
...@@ -48,7 +48,6 @@ boot_args: ...@@ -48,7 +48,6 @@ boot_args:
.import $global$ /* forward declaration */ .import $global$ /* forward declaration */
.import fault_vector_11,code /* IVA parisc 1.1 32 bit */ .import fault_vector_11,code /* IVA parisc 1.1 32 bit */
.import fault_vector_20,code /* IVA parisc 2.0 32 bit */ .import fault_vector_20,code /* IVA parisc 2.0 32 bit */
.import start_parisc,code /* then enable VM and go here */
.export stext .export stext
.export _stext,data /* Kernel want it this way! */ .export _stext,data /* Kernel want it this way! */
...@@ -74,7 +73,7 @@ stext: ...@@ -74,7 +73,7 @@ stext:
ldo R%PA(_end)(%r4),%r4 ldo R%PA(_end)(%r4),%r4
$bss_loop: $bss_loop:
cmpb,<<,n %r3,%r4,$bss_loop cmpb,<<,n %r3,%r4,$bss_loop
stb,ma %r0,1(%r3) stw,ma %r0,4(%r3)
/* Save away the arguments the boot loader passed in (32 bit args) */ /* Save away the arguments the boot loader passed in (32 bit args) */
...@@ -277,8 +276,8 @@ smp_slave_stext: ...@@ -277,8 +276,8 @@ smp_slave_stext:
ldo R%PA(smp_init_current_idle_task)(%sp),%sp ldo R%PA(smp_init_current_idle_task)(%sp),%sp
ldw 0(%sp),%sp /* load task address */ ldw 0(%sp),%sp /* load task address */
mtctl %sp,%cr30 /* store in cr30 */ mtctl %sp,%cr30 /* store in cr30 */
addil L%TASK_SZ_ALGN,%sp /* stack is above task */ addil L%THREAD_SZ_ALGN,%sp /* stack is above task */
ldo R%TASK_SZ_ALGN(%r1),%sp ldo R%THREAD_SZ_ALGN(%r1),%sp
/* point CPU to kernel page tables */ /* point CPU to kernel page tables */
ldil L%PA(swapper_pg_dir),%r4 ldil L%PA(swapper_pg_dir),%r4
......
...@@ -176,7 +176,9 @@ common_stext: ...@@ -176,7 +176,9 @@ common_stext:
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
/* Save the rfi target address */ /* Save the rfi target address */
std %r11, TASK_PT_GR11-TASK_SZ_ALGN(%sp) ldo -THREAD_SZ_ALGN(%sp), %r1
ldd TI_TASK(%r1), %r1
std %r11, TASK_PT_GR11(%r1)
#ifndef CONFIG_PDC_NARROW #ifndef CONFIG_PDC_NARROW
/* Switch to wide mode; Superdome doesn't support narrow PDC /* Switch to wide mode; Superdome doesn't support narrow PDC
...@@ -206,7 +208,9 @@ common_stext: ...@@ -206,7 +208,9 @@ common_stext:
stext_pdc_ret: stext_pdc_ret:
/* restore rfi target address*/ /* restore rfi target address*/
ldd TASK_PT_GR11-TASK_SZ_ALGN(%sp), %r11 ldo -THREAD_SZ_ALGN(%sp), %r1
ldd TI_TASK(%r1), %r1
ldd TASK_PT_GR11(%r1), %r11
/* PARANOID: clear user scratch/user space SR's */ /* PARANOID: clear user scratch/user space SR's */
mtsp %r0,%sr0 mtsp %r0,%sr0
...@@ -310,7 +314,7 @@ smp_slave_stext: ...@@ -310,7 +314,7 @@ smp_slave_stext:
load32 PA(smp_init_current_idle_task),%sp load32 PA(smp_init_current_idle_task),%sp
ldd 0(%sp),%sp /* load task address */ ldd 0(%sp),%sp /* load task address */
mtctl %sp,%cr30 /* store in cr30 */ mtctl %sp,%cr30 /* store in cr30 */
ldo TASK_SZ_ALGN(%sp),%sp ldo THREAD_SZ_ALGN(%sp),%sp
tophys_r1 %sp tophys_r1 %sp
/* point CPU to kernel page tables */ /* point CPU to kernel page tables */
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/parisc-device.h>
/* /*
** Debug options ** Debug options
...@@ -529,7 +530,8 @@ static void __init system_map_inventory(void) ...@@ -529,7 +530,8 @@ static void __init system_map_inventory(void)
* first stop the usb controller, otherwise the machine * first stop the usb controller, otherwise the machine
* might crash during iommu setup * might crash during iommu setup
*/ */
pdc_suspend_usb(); #warning We still probably need to worry about USB here, but how?
/* pdc_suspend_usb(); */
for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) { for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {
struct parisc_device *dev; struct parisc_device *dev;
...@@ -587,6 +589,8 @@ void __init do_memory_inventory(void) ...@@ -587,6 +589,8 @@ void __init do_memory_inventory(void)
void __init do_device_inventory(void) void __init do_device_inventory(void)
{ {
extern void parisc_generic_device_register(void);
printk(KERN_INFO "Searching for devices...\n"); printk(KERN_INFO "Searching for devices...\n");
switch (pdc_type) { switch (pdc_type) {
...@@ -606,7 +610,7 @@ void __init do_device_inventory(void) ...@@ -606,7 +610,7 @@ void __init do_device_inventory(void)
default: default:
panic("Unknown PDC type!\n"); panic("Unknown PDC type!\n");
} }
parisc_generic_device_register();
printk(KERN_INFO "Found devices:\n"); printk(KERN_INFO "Found devices:\n");
print_parisc_devices(); print_parisc_devices();
} }
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include "sys32.h" #include "sys32.h"
#include <linux/compat.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp.h> #include <linux/smp.h>
...@@ -164,7 +165,7 @@ static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -164,7 +165,7 @@ static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg) static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
{ {
struct timeval32 *up = (struct timeval32 *)arg; struct compat_timeval *up = (struct compat_timeval *)arg;
struct timeval ktv; struct timeval ktv;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
int err; int err;
...@@ -206,13 +207,13 @@ struct ifreq32 { ...@@ -206,13 +207,13 @@ struct ifreq32 {
struct ifmap32 ifru_map; struct ifmap32 ifru_map;
char ifru_slave[IFNAMSIZ]; /* Just fits the size */ char ifru_slave[IFNAMSIZ]; /* Just fits the size */
char ifru_newname[IFNAMSIZ]; char ifru_newname[IFNAMSIZ];
__kernel_caddr_t32 ifru_data; compat_caddr_t ifru_data;
} ifr_ifru; } ifr_ifru;
}; };
struct ifconf32 { struct ifconf32 {
int ifc_len; /* size of buffer */ int ifc_len; /* size of buffer */
__kernel_caddr_t32 ifcbuf; compat_caddr_t ifcbuf;
}; };
static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg) static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
...@@ -575,29 +576,29 @@ static inline int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long ...@@ -575,29 +576,29 @@ static inline int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long
#endif /* 0 */ #endif /* 0 */
struct fb_fix_screeninfo32 { struct fb_fix_screeninfo32 {
char id[16]; char id[16];
__kernel_caddr_t32 smem_start; compat_caddr_t smem_start;
__u32 smem_len; __u32 smem_len;
__u32 type; __u32 type;
__u32 type_aux; __u32 type_aux;
__u32 visual; __u32 visual;
__u16 xpanstep; __u16 xpanstep;
__u16 ypanstep; __u16 ypanstep;
__u16 ywrapstep; __u16 ywrapstep;
__u32 line_length; __u32 line_length;
__kernel_caddr_t32 mmio_start; compat_caddr_t mmio_start;
__u32 mmio_len; __u32 mmio_len;
__u32 accel; __u32 accel;
__u16 reserved[3]; __u16 reserved[3];
}; };
struct fb_cmap32 { struct fb_cmap32 {
__u32 start; __u32 start;
__u32 len; __u32 len;
__kernel_caddr_t32 red; compat_caddr_t red;
__kernel_caddr_t32 green; compat_caddr_t green;
__kernel_caddr_t32 blue; compat_caddr_t blue;
__kernel_caddr_t32 transp; compat_caddr_t transp;
}; };
static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
...@@ -752,7 +753,7 @@ struct floppy_struct32 { ...@@ -752,7 +753,7 @@ struct floppy_struct32 {
unsigned char rate; unsigned char rate;
unsigned char spec1; unsigned char spec1;
unsigned char fmt_gap; unsigned char fmt_gap;
const __kernel_caddr_t32 name; const compat_caddr_t name;
}; };
struct floppy_drive_params32 { struct floppy_drive_params32 {
...@@ -791,7 +792,7 @@ struct floppy_drive_struct32 { ...@@ -791,7 +792,7 @@ struct floppy_drive_struct32 {
int fd_ref; int fd_ref;
int fd_device; int fd_device;
int last_checked; int last_checked;
__kernel_caddr_t32 dmabuf; compat_caddr_t dmabuf;
int bufblocks; int bufblocks;
}; };
...@@ -1053,15 +1054,15 @@ out: if (karg) kfree(karg); ...@@ -1053,15 +1054,15 @@ out: if (karg) kfree(karg);
} }
struct ppp_option_data32 { struct ppp_option_data32 {
__kernel_caddr_t32 ptr; compat_caddr_t ptr;
__u32 length; __u32 length;
int transmit; int transmit;
}; };
#define PPPIOCSCOMPRESS32 _IOW('t', 77, struct ppp_option_data32) #define PPPIOCSCOMPRESS32 _IOW('t', 77, struct ppp_option_data32)
struct ppp_idle32 { struct ppp_idle32 {
__kernel_time_t32 xmit_idle; compat_time_t xmit_idle;
__kernel_time_t32 recv_idle; compat_time_t recv_idle;
}; };
#define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32) #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
...@@ -1135,8 +1136,8 @@ struct mtget32 { ...@@ -1135,8 +1136,8 @@ struct mtget32 {
__u32 mt_dsreg; __u32 mt_dsreg;
__u32 mt_gstat; __u32 mt_gstat;
__u32 mt_erreg; __u32 mt_erreg;
__kernel_daddr_t32 mt_fileno; compat_daddr_t mt_fileno;
__kernel_daddr_t32 mt_blkno; compat_daddr_t mt_blkno;
}; };
#define MTIOCGET32 _IOR('m', 2, struct mtget32) #define MTIOCGET32 _IOR('m', 2, struct mtget32)
...@@ -1254,25 +1255,25 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1254,25 +1255,25 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
struct cdrom_read32 { struct cdrom_read32 {
int cdread_lba; int cdread_lba;
__kernel_caddr_t32 cdread_bufaddr; compat_caddr_t cdread_bufaddr;
int cdread_buflen; int cdread_buflen;
}; };
struct cdrom_read_audio32 { struct cdrom_read_audio32 {
union cdrom_addr addr; union cdrom_addr addr;
u_char addr_format; u_char addr_format;
int nframes; int nframes;
__kernel_caddr_t32 buf; compat_caddr_t buf;
}; };
struct cdrom_generic_command32 { struct cdrom_generic_command32 {
unsigned char cmd[CDROM_PACKET_SIZE]; unsigned char cmd[CDROM_PACKET_SIZE];
__kernel_caddr_t32 buffer; compat_caddr_t buffer;
unsigned int buflen; unsigned int buflen;
int stat; int stat;
__kernel_caddr_t32 sense; compat_caddr_t sense;
__kernel_caddr_t32 reserved[3]; compat_caddr_t reserved[3];
}; };
static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
...@@ -1281,7 +1282,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar ...@@ -1281,7 +1282,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
struct cdrom_read cdread; struct cdrom_read cdread;
struct cdrom_read_audio cdreadaudio; struct cdrom_read_audio cdreadaudio;
struct cdrom_generic_command cgc; struct cdrom_generic_command cgc;
__kernel_caddr_t32 addr; compat_caddr_t addr;
char *data = 0; char *data = 0;
void *karg; void *karg;
int err = 0; int err = 0;
...@@ -1364,18 +1365,18 @@ out: if (data) ...@@ -1364,18 +1365,18 @@ out: if (data)
} }
struct loop_info32 { struct loop_info32 {
int lo_number; /* ioctl r/o */ int lo_number; /* ioctl r/o */
__kernel_dev_t32 lo_device; /* ioctl r/o */ compat_dev_t lo_device; /* ioctl r/o */
unsigned int lo_inode; /* ioctl r/o */ unsigned int lo_inode; /* ioctl r/o */
__kernel_dev_t32 lo_rdevice; /* ioctl r/o */ compat_dev_t lo_rdevice; /* ioctl r/o */
int lo_offset; int lo_offset;
int lo_encrypt_type; int lo_encrypt_type;
int lo_encrypt_key_size; /* ioctl w/o */ int lo_encrypt_key_size; /* ioctl w/o */
int lo_flags; /* ioctl r/o */ int lo_flags; /* ioctl r/o */
char lo_name[LO_NAME_SIZE]; char lo_name[LO_NAME_SIZE];
unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
unsigned int lo_init[2]; unsigned int lo_init[2];
char reserved[4]; char reserved[4];
}; };
static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg) static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
...@@ -1576,21 +1577,21 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a ...@@ -1576,21 +1577,21 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
set_fs(old_fs); set_fs(old_fs);
if (err >= 0) if (err >= 0)
err = put_user(kuid, (__kernel_uid_t32 *)arg); err = put_user(kuid, (compat_uid_t *)arg);
return err; return err;
} }
#endif #endif
struct atmif_sioc32 { struct atmif_sioc32 {
int number; int number;
int length; int length;
__kernel_caddr_t32 arg; compat_caddr_t arg;
}; };
struct atm_iobuf32 { struct atm_iobuf32 {
int length; int length;
__kernel_caddr_t32 buffer; compat_caddr_t buffer;
}; };
#define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32) #define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
...@@ -1651,7 +1652,7 @@ static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1651,7 +1652,7 @@ static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg)
iobuf.length = iobuf32.length; iobuf.length = iobuf32.length;
if (iobuf32.buffer == (__kernel_caddr_t32) NULL || iobuf32.length == 0) { if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
iobuf.buffer = (void*)(unsigned long)iobuf32.buffer; iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
} else { } else {
iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL); iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
...@@ -1705,7 +1706,7 @@ static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1705,7 +1706,7 @@ static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg)
sioc.number = sioc32.number; sioc.number = sioc32.number;
sioc.length = sioc32.length; sioc.length = sioc32.length;
if (sioc32.arg == (__kernel_caddr_t32) NULL || sioc32.length == 0) { if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
sioc.arg = (void*)(unsigned long)sioc32.arg; sioc.arg = (void*)(unsigned long)sioc32.arg;
} else { } else {
sioc.arg = kmalloc(sioc.length, GFP_KERNEL); sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
...@@ -1863,8 +1864,8 @@ typedef struct { ...@@ -1863,8 +1864,8 @@ typedef struct {
} lv_status_byindex_req32_t; } lv_status_byindex_req32_t;
typedef struct { typedef struct {
__kernel_dev_t32 dev; compat_dev_t dev;
u32 lv; u32 lv;
} lv_status_bydev_req32_t; } lv_status_bydev_req32_t;
typedef struct { typedef struct {
...@@ -2950,11 +2951,6 @@ COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO) ...@@ -2950,11 +2951,6 @@ COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO) COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
COMPATIBLE_IOCTL(FBIOPAN_DISPLAY) COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
COMPATIBLE_IOCTL(FBIOGET_FCURSORINFO)
COMPATIBLE_IOCTL(FBIOGET_VCURSORINFO)
COMPATIBLE_IOCTL(FBIOPUT_VCURSORINFO)
COMPATIBLE_IOCTL(FBIOGET_CURSORSTATE)
COMPATIBLE_IOCTL(FBIOPUT_CURSORSTATE)
COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP) COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP) COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
/* Little f */ /* Little f */
...@@ -3627,7 +3623,7 @@ HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl) ...@@ -3627,7 +3623,7 @@ HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl) HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl)
#if 0 #if 0
/* One SMB ioctl needs translations. */ /* One SMB ioctl needs translations. */
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, __kernel_uid_t32) #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid) HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
#endif #endif
HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl) HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
......
/* Kernel module help for parisc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/moduleloader.h>
#include <linux/elf.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/kernel.h>
#if 0
#define DEBUGP printk
#else
#define DEBUGP(fmt...)
#endif
enum parisc_fsel {
e_fsel,
e_lsel,
e_rsel,
e_lrsel,
e_rrsel
};
void *module_alloc(unsigned long size)
{
if (size == 0)
return NULL;
return vmalloc(size);
}
/* Free memory returned from module_alloc */
void module_free(struct module *mod, void *module_region)
{
vfree(module_region);
/* FIXME: If module_region == mod->init_region, trim exception
table entries. */
}
/* We don't need anything special. */
long module_core_size(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
const char *secstrings,
struct module *module)
{
return module->core_size;
}
long module_init_size(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
const char *secstrings,
struct module *module)
{
return module->init_size;
}
int module_frob_arch_sections(Elf_Ehdr *hdr,
Elf_Shdr *sechdrs,
char *secstrings,
struct module *mod)
{
/* parisc should not need this ... */
printk(KERN_ERR "module %s: %s not yet implemented.\n",
mod->name, __FUNCTION__);
return 0;
}
int apply_relocate(Elf_Shdr *sechdrs,
const char *strtab,
unsigned int symindex,
unsigned int relsec,
struct module *me)
{
/* parisc should not need this ... */
printk(KERN_ERR "module %s: RELOCATION unsupported\n",
me->name);
return -ENOEXEC;
}
#ifndef __LP64__
int apply_relocate_add(Elf_Shdr *sechdrs,
const char *strtab,
unsigned int symindex,
unsigned int relsec,
struct module *me)
{
int i;
Elf32_Rela *rel = (void *)sechdrs[relsec].sh_addr;
Elf32_Sym *sym;
Elf32_Word *loc;
Elf32_Addr value;
DEBUGP("Applying relocate section %u to %u\n", relsec,
sechdrs[relsec].sh_info);
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
/* This is where to make the change */
loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
+ ELF32_R_SYM(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
value = sym->st_value + rel[i].r_addend;
DEBUGP("Symbol %s loc 0x%lx value 0x%lx: ",
strtab + sym->st_name,
(uint32_t)loc, value);
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_PARISC_PLABEL32:
/* 32-bit function address */
DEBUGP("R_PARISC_PLABEL32\n");
break;
case R_PARISC_DIR32:
/* direct 32-bit ref */
DEBUGP("R_PARISC_DIR32\n");
break;
case R_PARISC_DIR21L:
/* left 21 bits of effective address */
DEBUGP("R_PARISC_DIR21L\n");
break;
case R_PARISC_DIR14R:
/* right 14 bits of effective address */
DEBUGP("R_PARISC_DIR14R\n");
break;
case R_PARISC_SEGREL32:
/* 32-bit segment relative address */
DEBUGP("R_PARISC_SEGREL32\n");
break;
case R_PARISC_DPREL21L:
/* left 21 bit of relative address */
DEBUGP("R_PARISC_DPREL21L\n");
break;
case R_PARISC_DPREL14R:
/* right 14 bit of relative address */
DEBUGP("R_PARISC_DPREL14R\n");
break;
case R_PARISC_PCREL17F:
/* 17-bit PC relative address */
DEBUGP("R_PARISC_PCREL17F\n");
break;
case R_PARISC_PCREL22F:
/* 22-bit PC relative address */
DEBUGP("R_PARISC_PCREL22F\n");
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %Lu\n",
me->name, ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC;
}
}
return -ENOEXEC;
}
#else
int apply_relocate_add(Elf_Shdr *sechdrs,
const char *strtab,
unsigned int symindex,
unsigned int relsec,
struct module *me)
{
int i;
Elf64_Rela *rel = (void *)sechdrs[relsec].sh_addr;
Elf64_Sym *sym;
Elf64_Word *loc;
Elf64_Addr value;
DEBUGP("Applying relocate section %u to %u\n", relsec,
sechdrs[relsec].sh_info);
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
/* This is where to make the change */
loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
+ ELF64_R_SYM(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
value = sym->st_value + rel[i].r_addend;
DEBUGP("Symbol %s loc 0x%Lx value 0x%Lx: ",
strtab + sym->st_name,
(uint64_t)loc, value);
switch (ELF64_R_TYPE(rel[i].r_info)) {
case R_PARISC_LTOFF14R:
/* LT-relative; right 14 bits */
DEBUGP("R_PARISC_LTOFF14R\n");
break;
case R_PARISC_LTOFF21L:
/* LT-relative; left 21 bits */
DEBUGP("R_PARISC_LTOFF21L\n");
break;
case R_PARISC_PCREL22F:
/* PC-relative; 22 bits */
DEBUGP("R_PARISC_PCREL22F\n");
break;
case R_PARISC_DIR64:
/* 64-bit effective address */
DEBUGP("R_PARISC_DIR64\n");
*loc = value;
break;
case R_PARISC_SEGREL32:
/* 32-bit segment relative address */
DEBUGP("R_PARISC_SEGREL32\n");
break;
case R_PARISC_FPTR64:
/* 64-bit function address */
DEBUGP("R_PARISC_FPTR64\n");
break;
default:
printk(KERN_ERR "module %s: Unknown relocation: %Lu\n",
me->name, ELF64_R_TYPE(rel[i].r_info));
return -ENOEXEC;
}
}
return -ENOEXEC;
}
#endif
int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
return 0;
}
...@@ -86,9 +86,9 @@ EXPORT_SYMBOL(pdc_iodc_read); ...@@ -86,9 +86,9 @@ EXPORT_SYMBOL(pdc_iodc_read);
#include <asm/io.h> #include <asm/io.h>
EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap); EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(memcpy_toio); EXPORT_SYMBOL(__memcpy_toio);
EXPORT_SYMBOL(memcpy_fromio); EXPORT_SYMBOL(__memcpy_fromio);
EXPORT_SYMBOL(memset_io); EXPORT_SYMBOL(__memset_io);
#if defined(CONFIG_PCI) || defined(CONFIG_ISA) #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
EXPORT_SYMBOL(inb); EXPORT_SYMBOL(inb);
...@@ -141,7 +141,6 @@ extern void $$divU(void); ...@@ -141,7 +141,6 @@ extern void $$divU(void);
extern void $$remI(void); extern void $$remI(void);
extern void $$remU(void); extern void $$remU(void);
extern void $$mulI(void); extern void $$mulI(void);
extern void $$mulU(void);
extern void $$divU_3(void); extern void $$divU_3(void);
extern void $$divU_5(void); extern void $$divU_5(void);
extern void $$divU_6(void); extern void $$divU_6(void);
...@@ -166,9 +165,6 @@ EXPORT_SYMBOL_NOVERS($$divU); ...@@ -166,9 +165,6 @@ EXPORT_SYMBOL_NOVERS($$divU);
EXPORT_SYMBOL_NOVERS($$remI); EXPORT_SYMBOL_NOVERS($$remI);
EXPORT_SYMBOL_NOVERS($$remU); EXPORT_SYMBOL_NOVERS($$remU);
EXPORT_SYMBOL_NOVERS($$mulI); EXPORT_SYMBOL_NOVERS($$mulI);
#ifndef __LP64__
EXPORT_SYMBOL_NOVERS($$mulU);
#endif
EXPORT_SYMBOL_NOVERS($$divU_3); EXPORT_SYMBOL_NOVERS($$divU_3);
EXPORT_SYMBOL_NOVERS($$divU_5); EXPORT_SYMBOL_NOVERS($$divU_5);
EXPORT_SYMBOL_NOVERS($$divU_6); EXPORT_SYMBOL_NOVERS($$divU_6);
...@@ -215,3 +211,10 @@ extern void $$dyncall(void); ...@@ -215,3 +211,10 @@ extern void $$dyncall(void);
EXPORT_SYMBOL_NOVERS($$dyncall); EXPORT_SYMBOL_NOVERS($$dyncall);
#endif #endif
#ifdef CONFIG_PROFILING
EXPORT_SYMBOL_GPL(register_profile_notifier);
EXPORT_SYMBOL_GPL(unregister_profile_notifier);
#endif
#include <asm/pgtable.h>
EXPORT_SYMBOL_NOVERS(vmalloc_start);
...@@ -71,7 +71,7 @@ void dump_resmap(void) ...@@ -71,7 +71,7 @@ void dump_resmap(void)
static inline void dump_resmap(void) {;} static inline void dump_resmap(void) {;}
#endif #endif
static int pa11_dma_supported( struct pci_dev *dev, u64 mask) static int pa11_dma_supported( struct device *dev, u64 mask)
{ {
return 1; return 1;
} }
...@@ -349,7 +349,7 @@ pcxl_dma_init(void) ...@@ -349,7 +349,7 @@ pcxl_dma_init(void)
__initcall(pcxl_dma_init); __initcall(pcxl_dma_init);
static void * pa11_dma_alloc_consistent (struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) static void * pa11_dma_alloc_consistent (struct device *dev, size_t size, dma_addr_t *dma_handle)
{ {
unsigned long vaddr; unsigned long vaddr;
unsigned long paddr; unsigned long paddr;
...@@ -369,13 +369,13 @@ static void * pa11_dma_alloc_consistent (struct pci_dev *hwdev, size_t size, dma ...@@ -369,13 +369,13 @@ static void * pa11_dma_alloc_consistent (struct pci_dev *hwdev, size_t size, dma
** ISA cards will certainly only support 24-bit DMA addressing. ** ISA cards will certainly only support 24-bit DMA addressing.
** Not clear if we can, want, or need to support ISA. ** Not clear if we can, want, or need to support ISA.
*/ */
if (!hwdev || hwdev->dma_mask != 0xffffffff) if (!dev || *dev->dma_mask != 0xffffffff)
gfp |= GFP_DMA; gfp |= GFP_DMA;
#endif #endif
return (void *)vaddr; return (void *)vaddr;
} }
static void pa11_dma_free_consistent (struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) static void pa11_dma_free_consistent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
{ {
int order; int order;
...@@ -386,9 +386,9 @@ static void pa11_dma_free_consistent (struct pci_dev *hwdev, size_t size, void * ...@@ -386,9 +386,9 @@ static void pa11_dma_free_consistent (struct pci_dev *hwdev, size_t size, void *
free_pages((unsigned long)__va(dma_handle), order); free_pages((unsigned long)__va(dma_handle), order);
} }
static dma_addr_t pa11_dma_map_single(struct pci_dev *dev, void *addr, size_t size, int direction) static dma_addr_t pa11_dma_map_single(struct device *dev, void *addr, size_t size, enum dma_data_direction direction)
{ {
if (direction == PCI_DMA_NONE) { if (direction == DMA_NONE) {
printk(KERN_ERR "pa11_dma_map_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0)); printk(KERN_ERR "pa11_dma_map_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0));
BUG(); BUG();
} }
...@@ -397,14 +397,14 @@ static dma_addr_t pa11_dma_map_single(struct pci_dev *dev, void *addr, size_t si ...@@ -397,14 +397,14 @@ static dma_addr_t pa11_dma_map_single(struct pci_dev *dev, void *addr, size_t si
return virt_to_phys(addr); return virt_to_phys(addr);
} }
static void pa11_dma_unmap_single(struct pci_dev *dev, dma_addr_t dma_handle, size_t size, int direction) static void pa11_dma_unmap_single(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction)
{ {
if (direction == PCI_DMA_NONE) { if (direction == DMA_NONE) {
printk(KERN_ERR "pa11_dma_unmap_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0)); printk(KERN_ERR "pa11_dma_unmap_single(PCI_DMA_NONE) called by %p\n", __builtin_return_address(0));
BUG(); BUG();
} }
if (direction == PCI_DMA_TODEVICE) if (direction == DMA_TO_DEVICE)
return; return;
/* /*
...@@ -417,11 +417,11 @@ static void pa11_dma_unmap_single(struct pci_dev *dev, dma_addr_t dma_handle, si ...@@ -417,11 +417,11 @@ static void pa11_dma_unmap_single(struct pci_dev *dev, dma_addr_t dma_handle, si
return; return;
} }
static int pa11_dma_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) static int pa11_dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
{ {
int i; int i;
if (direction == PCI_DMA_NONE) if (direction == DMA_NONE)
BUG(); BUG();
for (i = 0; i < nents; i++, sglist++ ) { for (i = 0; i < nents; i++, sglist++ ) {
...@@ -433,14 +433,14 @@ static int pa11_dma_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int ...@@ -433,14 +433,14 @@ static int pa11_dma_map_sg(struct pci_dev *dev, struct scatterlist *sglist, int
return nents; return nents;
} }
static void pa11_dma_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
{ {
int i; int i;
if (direction == PCI_DMA_NONE) if (direction == DMA_NONE)
BUG(); BUG();
if (direction == PCI_DMA_TODEVICE) if (direction == DMA_TO_DEVICE)
return; return;
/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */ /* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
...@@ -450,15 +450,15 @@ static void pa11_dma_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, i ...@@ -450,15 +450,15 @@ static void pa11_dma_unmap_sg(struct pci_dev *dev, struct scatterlist *sglist, i
return; return;
} }
static void pa11_dma_sync_single(struct pci_dev *dev, dma_addr_t dma_handle, size_t size, int direction) static void pa11_dma_sync_single(struct device *dev, dma_addr_t dma_handle, unsigned long offset, size_t size, enum dma_data_direction direction)
{ {
if (direction == PCI_DMA_NONE) if (direction == DMA_NONE)
BUG(); BUG();
flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle), size); flush_kernel_dcache_range((unsigned long) phys_to_virt(dma_handle) + offset, size);
} }
static void pa11_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sglist, int nents, int direction) static void pa11_dma_sync_sg(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
{ {
int i; int i;
...@@ -468,40 +468,56 @@ static void pa11_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sglist, in ...@@ -468,40 +468,56 @@ static void pa11_dma_sync_sg(struct pci_dev *dev, struct scatterlist *sglist, in
flush_kernel_dcache_range(sg_virt_addr(sglist), sglist->length); flush_kernel_dcache_range(sg_virt_addr(sglist), sglist->length);
} }
struct pci_dma_ops pcxl_dma_ops = { struct hppa_dma_ops pcxl_dma_ops = {
pa11_dma_supported, /* dma_support */ .dma_supported = pa11_dma_supported,
pa11_dma_alloc_consistent, .alloc_consistent = pa11_dma_alloc_consistent,
pa11_dma_free_consistent, .alloc_noncoherent = pa11_dma_alloc_consistent,
pa11_dma_map_single, /* map_single */ .free_consistent = pa11_dma_free_consistent,
pa11_dma_unmap_single, /* unmap_single */ .map_single = pa11_dma_map_single,
pa11_dma_map_sg, /* map_sg */ .unmap_single = pa11_dma_unmap_single,
pa11_dma_unmap_sg, /* unmap_sg */ .map_sg = pa11_dma_map_sg,
pa11_dma_sync_single, /* dma_sync_single */ .unmap_sg = pa11_dma_unmap_sg,
pa11_dma_sync_sg /* dma_sync_sg */ .dma_sync_single = pa11_dma_sync_single,
.dma_sync_sg = pa11_dma_sync_sg,
}; };
static void *fail_alloc_consistent(struct pci_dev *hwdev, size_t size, static void *fail_alloc_consistent(struct device *dev, size_t size,
dma_addr_t *dma_handle) dma_addr_t *dma_handle)
{ {
return NULL; return NULL;
} }
static void fail_free_consistent(struct pci_dev *dev, size_t size, static void *pa11_dma_alloc_noncoherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t iova) dma_addr_t *dma_handle)
{
void *addr = NULL;
/* rely on kmalloc to be cacheline aligned */
addr = kmalloc(size, GFP_KERNEL);
if(addr)
*dma_handle = (dma_addr_t)virt_to_phys(addr);
return addr;
}
static void pa11_dma_free_noncoherent(struct device *dev, size_t size,
void *vaddr, dma_addr_t iova)
{ {
kfree(vaddr);
return; return;
} }
struct pci_dma_ops pcx_dma_ops = { struct hppa_dma_ops pcx_dma_ops = {
pa11_dma_supported, /* dma_support */ .dma_supported = pa11_dma_supported,
fail_alloc_consistent, .alloc_consistent = fail_alloc_consistent,
fail_free_consistent, .alloc_noncoherent = pa11_dma_alloc_noncoherent,
pa11_dma_map_single, /* map_single */ .free_consistent = pa11_dma_free_noncoherent,
pa11_dma_unmap_single, /* unmap_single */ .map_single = pa11_dma_map_single,
pa11_dma_map_sg, /* map_sg */ .unmap_single = pa11_dma_unmap_single,
pa11_dma_unmap_sg, /* unmap_sg */ .map_sg = pa11_dma_map_sg,
pa11_dma_sync_single, /* dma_sync_single */ .unmap_sg = pa11_dma_unmap_sg,
pa11_dma_sync_sg /* dma_sync_sg */ .dma_sync_single = pa11_dma_sync_single,
.dma_sync_sg = pa11_dma_sync_sg,
}; };
......
...@@ -238,7 +238,7 @@ pcibios_update_resource( ...@@ -238,7 +238,7 @@ pcibios_update_resource(
if (res->flags & IORESOURCE_IO) { if (res->flags & IORESOURCE_IO) {
barval = PCI_PORT_ADDR(res->start); barval = PCI_PORT_ADDR(res->start);
} else if (res->flags & IORESOURCE_MEM) { } else if (res->flags & IORESOURCE_MEM) {
barval = PCI_BUS_ADDR(HBA_DATA(dev->bus->sysdata), res->start); barval = PCI_BUS_ADDR(HBA_DATA(dev->bus->dev->platform_data), res->start);
} else { } else {
panic("pcibios_update_resource() WTF? flags not IO or MEM"); panic("pcibios_update_resource() WTF? flags not IO or MEM");
} }
...@@ -350,7 +350,7 @@ void __devinit pcibios_fixup_pbus_ranges( ...@@ -350,7 +350,7 @@ void __devinit pcibios_fixup_pbus_ranges(
struct pbus_set_ranges_data *ranges struct pbus_set_ranges_data *ranges
) )
{ {
struct pci_hba_data *hba = HBA_DATA(bus->sysdata); struct pci_hba_data *hba = HBA_DATA(bus->dev->platform_data);
/* /*
** I/O space may see busnumbers here. Something ** I/O space may see busnumbers here. Something
...@@ -487,24 +487,6 @@ pcibios_setup_host_bridge(struct pci_bus *bus) ...@@ -487,24 +487,6 @@ pcibios_setup_host_bridge(struct pci_bus *bus)
} }
/*
** Mostly copied from drivers/pci/setup-bus.c:pci_assign_unassigned_resources()
*/
void __devinit
pcibios_assign_unassigned_resources(struct pci_bus *bus)
{
/* from drivers/pci/setup-bus.c */
extern void pbus_assign_resources(struct pci_bus *bus, struct pbus_set_ranges_data *ranges);
struct pbus_set_ranges_data ranges;
ranges.io_end = ranges.io_start
= bus->resource[0]->start + PCIBIOS_MIN_IO;
ranges.mem_end = ranges.mem_start
= bus->resource[1]->start + PCIBIOS_MIN_MEM;
pbus_assign_resources(bus, &ranges);
}
/* /*
** PARISC specific (unfortunately) ** PARISC specific (unfortunately)
*/ */
......
...@@ -56,7 +56,7 @@ static int pdc_console_setup(struct console *co, char *options) ...@@ -56,7 +56,7 @@ static int pdc_console_setup(struct console *co, char *options)
#define PDC_CONSOLE_DEVICE pdc_console_device #define PDC_CONSOLE_DEVICE pdc_console_device
static kdev_t pdc_console_device (struct console *c) static kdev_t pdc_console_device (struct console *c)
{ {
return mk_kdev(PDCCONS_MAJOR, 0); return mk_kdev(MUX_MAJOR, 0);
} }
#else #else
#define PDC_CONSOLE_DEVICE NULL #define PDC_CONSOLE_DEVICE NULL
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
...@@ -51,6 +50,7 @@ ...@@ -51,6 +50,7 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/perf.h> #include <asm/perf.h>
#include <asm/parisc-device.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/runway.h> #include <asm/runway.h>
#include <asm/io.h> /* for __raw_read() */ #include <asm/io.h> /* for __raw_read() */
...@@ -269,8 +269,6 @@ static int perf_open(struct inode *inode, struct file *file) ...@@ -269,8 +269,6 @@ static int perf_open(struct inode *inode, struct file *file)
perf_enabled = 1; perf_enabled = 1;
spin_unlock(&perf_lock); spin_unlock(&perf_lock);
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -283,8 +281,6 @@ static int perf_release(struct inode *inode, struct file *file) ...@@ -283,8 +281,6 @@ static int perf_release(struct inode *inode, struct file *file)
perf_enabled = 0; perf_enabled = 0;
spin_unlock(&perf_lock); spin_unlock(&perf_lock);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -500,7 +496,7 @@ static struct miscdevice perf_dev = { ...@@ -500,7 +496,7 @@ static struct miscdevice perf_dev = {
*/ */
static int __init perf_init(void) static int __init perf_init(void)
{ {
int retval; int ret;
/* Determine correct processor interface to use */ /* Determine correct processor interface to use */
bitmask_array = perf_bitmasks; bitmask_array = perf_bitmasks;
...@@ -520,11 +516,11 @@ static int __init perf_init(void) ...@@ -520,11 +516,11 @@ static int __init perf_init(void)
return -ENODEV; return -ENODEV;
} }
retval = misc_register(&perf_dev); ret = misc_register(&perf_dev);
if (retval < 0) { if (ret) {
printk(KERN_ERR "Performance monitoring counters: " printk(KERN_ERR "Performance monitoring counters: "
"cannot register misc device.\n"); "cannot register misc device.\n");
return retval; return ret;
} }
/* Patch the images to match the system */ /* Patch the images to match the system */
......
...@@ -217,7 +217,7 @@ sys_clone(unsigned long clone_flags, unsigned long usp, ...@@ -217,7 +217,7 @@ sys_clone(unsigned long clone_flags, unsigned long usp,
{ {
struct task_struct *p; struct task_struct *p;
int *user_tid = (int *)regs->gr[26]; int *user_tid = (int *)regs->gr[26];
p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid); p = do_fork(clone_flags & ~CLONE_IDLETASK, usp, regs, 0, user_tid, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -225,7 +225,7 @@ int ...@@ -225,7 +225,7 @@ int
sys_vfork(struct pt_regs *regs) sys_vfork(struct pt_regs *regs)
{ {
struct task_struct *p; struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0, NULL); p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gr[30], regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -295,6 +295,11 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -295,6 +295,11 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
return 0; return 0;
} }
unsigned long thread_saved_pc(struct task_struct *t)
{
return t->thread.regs.kpc;
}
/* /*
* sys_execve() executes a new program. * sys_execve() executes a new program.
*/ */
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/irq.h> /* for struct irq_region */ #include <asm/irq.h> /* for struct irq_region */
#include <asm/parisc-device.h>
struct system_cpuinfo_parisc boot_cpu_data; struct system_cpuinfo_parisc boot_cpu_data;
struct cpuinfo_parisc cpu_data[NR_CPUS]; struct cpuinfo_parisc cpu_data[NR_CPUS];
......
/* arch/parisc/kernel/profile.c
*
* Almost entirely copied from ppc64 which is:
* (C) 2002 John Levon <levon@movementarian.org>
*/
#include <linux/profile.h>
#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <asm/irq.h>
static struct notifier_block *profile_listeners;
static rwlock_t profile_lock = RW_LOCK_UNLOCKED;
int register_profile_notifier(struct notifier_block *nb)
{
int err;
write_lock_irq(&profile_lock);
err = notifier_chain_register(&profile_listeners, nb);
write_unlock_irq(&profile_lock);
return err;
}
int unregister_profile_notifier(struct notifier_block *nb)
{
int err;
write_lock_irq(&profile_lock);
err = notifier_chain_unregister(&profile_listeners, nb);
write_unlock_irq(&profile_lock);
return err;
}
void parisc_profile_hook(struct pt_regs *regs)
{
read_lock(&profile_lock);
notifier_call_chain(&profile_listeners, 0, regs);
read_unlock(&profile_lock);
}
...@@ -103,7 +103,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -103,7 +103,7 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
if (current->ptrace & PT_PTRACED) if (current->ptrace & PT_PTRACED)
goto out; goto out;
ret = security_ops->ptrace(current->parent, current); ret = security_ptrace(current->parent, current);
if (ret) if (ret)
goto out; goto out;
......
...@@ -136,15 +136,15 @@ void __init setup_arch(char **cmdline_p) ...@@ -136,15 +136,15 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_CHASSIS_LCD_LED #ifdef CONFIG_CHASSIS_LCD_LED
/* initialize the LCD/LED after boot_cpu_data is available ! */ /* initialize the LCD/LED after boot_cpu_data is available ! */
led_init(); /* LCD/LED initialization */ led_init(); /* LCD/LED initialization */
#endif #endif
#ifdef CONFIG_PA11 #ifdef CONFIG_PA11
dma_ops_init(); dma_ops_init();
#endif #endif
#ifdef CONFIG_DUMMY_CONSOLE #if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
conswitchp = &dummy_con; /* we use take_over_console() later ! */ conswitchp = &dummy_con; /* we use take_over_console() later ! */
#endif #endif
} }
...@@ -185,7 +185,7 @@ struct seq_operations cpuinfo_op = { ...@@ -185,7 +185,7 @@ struct seq_operations cpuinfo_op = {
.show = show_cpuinfo .show = show_cpuinfo
}; };
static void parisc_proc_mkdir(void) static void __init parisc_proc_mkdir(void)
{ {
/* /*
** Can't call proc_mkdir() until after proc_root_init() has been ** Can't call proc_mkdir() until after proc_root_init() has been
...@@ -236,7 +236,7 @@ static struct resource global_broadcast = { ...@@ -236,7 +236,7 @@ static struct resource global_broadcast = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}; };
int __init parisc_init_resources(void) static int __init parisc_init_resources(void)
{ {
int result; int result;
...@@ -270,6 +270,7 @@ int __init parisc_init_resources(void) ...@@ -270,6 +270,7 @@ int __init parisc_init_resources(void)
extern void gsc_init(void); extern void gsc_init(void);
extern void processor_init(void); extern void processor_init(void);
extern void ccio_init(void); extern void ccio_init(void);
extern void hppb_init(void);
extern void dino_init(void); extern void dino_init(void);
extern void iosapic_init(void); extern void iosapic_init(void);
extern void lba_init(void); extern void lba_init(void);
...@@ -321,6 +322,11 @@ static int __init parisc_init(void) ...@@ -321,6 +322,11 @@ static int __init parisc_init(void)
#ifdef CONFIG_EISA #ifdef CONFIG_EISA
eisa_init(); eisa_init();
#endif #endif
#if defined(CONFIG_HPPB)
hppb_init();
#endif
#if defined(CONFIG_GSC_DINO) #if defined(CONFIG_GSC_DINO)
dino_init(); dino_init();
#endif #endif
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <asm/rt_sigframe.h> #include <asm/rt_sigframe.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/cacheflush.h>
#define DEBUG_SIG 0 #define DEBUG_SIG 0
...@@ -40,6 +41,10 @@ ...@@ -40,6 +41,10 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
/* Use this to get at 32-bit user passed pointers.
* See sys_sparc32.c for description about these. */
#define A(__x) ((unsigned long)(__x))
int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall); int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall);
int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
...@@ -308,28 +313,26 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -308,28 +313,26 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
(unsigned long) &frame->tramp[4]); (unsigned long) &frame->tramp[4]);
#else #else
/* It should *always* be cache line-aligned, but the compiler /* It should *always* be cache line-aligned, but the compiler
sometimes screws up. */ sometimes screws up. */
asm volatile("fdc 0(%%sr3,%0)\n\t" asm volatile("fdc 0(%%sr3,%0)\n\t"
"fdc %1(%%sr3,%0)\n\t" "fdc %1(%%sr3,%0)\n\t"
"sync\n\t" "sync\n\t"
"fic 0(%%sr3,%0)\n\t" "fic 0(%%sr3,%0)\n\t"
"fic %1(%%sr3,%0)\n\t" "fic %1(%%sr3,%0)\n\t"
"sync\n\t" "sync\n\t"
: : "r" (frame->tramp), "r" (L1_CACHE_BYTES)); : : "r" (frame->tramp), "r" (L1_CACHE_BYTES));
#endif #endif
rp = (unsigned long) frame->tramp; rp = (unsigned long) frame->tramp;
if (err) if (err)
goto give_sigsegv; goto give_sigsegv;
#ifdef __LP64__
/* Much more has to happen with signals than this -- but it'll at least */ /* Much more has to happen with signals than this -- but it'll at least */
/* provide a pointer to some places which definitely need a look. */ /* provide a pointer to some places which definitely need a look. */
#define HACK unsigned int #define HACK u32
#else
#define HACK unsigned long haddr = (HACK)A(ka->sa.sa_handler);
#endif
haddr = (HACK) ka->sa.sa_handler;
/* ARGH! Fucking brain damage. You don't want to know. */ /* ARGH! Fucking brain damage. You don't want to know. */
if (haddr & 2) { if (haddr & 2) {
HACK *plabel; HACK *plabel;
...@@ -355,13 +358,13 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -355,13 +358,13 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
regs->gr[2] = rp; /* userland return pointer */ regs->gr[2] = rp; /* userland return pointer */
regs->gr[26] = sig; /* signal number */ regs->gr[26] = sig; /* signal number */
regs->gr[25] = (HACK) &frame->info; /* siginfo pointer */ regs->gr[25] = (HACK)A(&frame->info); /* siginfo pointer */
regs->gr[24] = (HACK) &frame->uc; /* ucontext pointer */ regs->gr[24] = (HACK)A(&frame->uc); /* ucontext pointer */
DBG(("making sigreturn frame: %#lx + %#x = %#lx\n", DBG(("making sigreturn frame: %#lx + %#x = %#lx\n",
regs->gr[30], PARISC_RT_SIGFRAME_SIZE, regs->gr[30], PARISC_RT_SIGFRAME_SIZE,
regs->gr[30] + PARISC_RT_SIGFRAME_SIZE)); regs->gr[30] + PARISC_RT_SIGFRAME_SIZE));
/* Raise the user stack pointer to make a proper call frame. */ /* Raise the user stack pointer to make a proper call frame. */
regs->gr[30] = ((HACK) frame + PARISC_RT_SIGFRAME_SIZE); regs->gr[30] = ((HACK)A(frame) + PARISC_RT_SIGFRAME_SIZE);
DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n", DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
current->comm, current->pid, frame, regs->gr[30], current->comm, current->pid, frame, regs->gr[30],
......
/* mostly borrowed from kernel/signal.c */ /* mostly borrowed from kernel/signal.c */
#include <linux/config.h> #include <linux/config.h>
#include <linux/compat.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/unistd.h> #include <linux/unistd.h>
...@@ -175,7 +176,7 @@ sys32_rt_sigaction(int sig, const struct sigaction32 *act, struct sigaction32 *o ...@@ -175,7 +176,7 @@ sys32_rt_sigaction(int sig, const struct sigaction32 *act, struct sigaction32 *o
typedef struct { typedef struct {
unsigned int ss_sp; unsigned int ss_sp;
int ss_flags; int ss_flags;
__kernel_size_t32 ss_size; compat_size_t ss_size;
} stack_t32; } stack_t32;
int int
......
...@@ -516,7 +516,7 @@ static struct task_struct *fork_by_hand(void) ...@@ -516,7 +516,7 @@ static struct task_struct *fork_by_hand(void)
* don't care about the regs settings since * don't care about the regs settings since
* we'll never reschedule the forked task. * we'll never reschedule the forked task.
*/ */
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
} }
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
set_fs (old_fs); \ set_fs (old_fs); \
} }
struct timeval32 {
int tv_sec;
int tv_usec;
};
typedef __u32 __sighandler_t32; typedef __u32 __sighandler_t32;
#include <linux/signal.h> #include <linux/signal.h>
......
...@@ -308,3 +308,32 @@ asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on) ...@@ -308,3 +308,32 @@ asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{ {
return -ENOSYS; return -ENOSYS;
} }
/*
* Set a given TLS descriptor:
*/
asmlinkage int sys_set_thread_area(struct user_desc *u_info)
{
return -ENOSYS;
}
/*
* Get the current Thread-Local Storage area:
*/
asmlinkage int sys_get_thread_area(struct user_desc *u_info)
{
return -ENOSYS;
}
asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag)
{
return -ENOMEM;
}
asmlinkage int sys_free_hugepages(unsigned long addr)
{
return -EINVAL;
}
This diff is collapsed.
...@@ -23,12 +23,6 @@ ...@@ -23,12 +23,6 @@
#endif #endif
.text .text
#ifdef __LP64__
#define FRAME_SIZE 128
#else
#define FRAME_SIZE 64
#endif
.import syscall_exit,code .import syscall_exit,code
.import syscall_exit_rfi,code .import syscall_exit_rfi,code
.export linux_gateway_page .export linux_gateway_page
...@@ -99,9 +93,9 @@ linux_gateway_entry: ...@@ -99,9 +93,9 @@ linux_gateway_entry:
*/ */
mtsp %r0,%sr7 /* get kernel space into sr7 */ mtsp %r0,%sr7 /* get kernel space into sr7 */
STREG %r1,0(%r30) /* Stick r1 (usp) here for now */ STREGM %r1,FRAME_SIZE(%r30) /* save r1 (usp) here for now */
mfctl %cr30,%r1 /* get task ptr in %r1 */ mfctl %cr30,%r1 /* get task ptr in %r1 */
LDREG 0(%r1),%r1 LDREG TI_TASK(%r1),%r1
/* Save some registers for sigcontext and potential task /* Save some registers for sigcontext and potential task
switch (see entry.S for the details of which ones are switch (see entry.S for the details of which ones are
...@@ -110,7 +104,7 @@ linux_gateway_entry: ...@@ -110,7 +104,7 @@ linux_gateway_entry:
PSW value is stored. This is needed for gdb and sys_ptrace. */ PSW value is stored. This is needed for gdb and sys_ptrace. */
STREG %r0, TASK_PT_PSW(%r1) STREG %r0, TASK_PT_PSW(%r1)
STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */ STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */
LDREG 0(%r30), %r2 /* get users sp back */ LDREGM -FRAME_SIZE(%r30), %r2 /* get users sp back */
STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */ STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */
STREG %r19, TASK_PT_GR19(%r1) STREG %r19, TASK_PT_GR19(%r1)
STREG %r20, TASK_PT_GR20(%r1) STREG %r20, TASK_PT_GR20(%r1)
...@@ -204,7 +198,7 @@ tracesys: ...@@ -204,7 +198,7 @@ tracesys:
* in the saved PSW. * in the saved PSW.
*/ */
ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
LDREG 0(%r1), %r1 LDREG TI_TASK(%r1), %r1
ssm 0,%r2 ssm 0,%r2
STREG %r2,TASK_PT_PSW(%r1) /* Lower 8 bits only!! */ STREG %r2,TASK_PT_PSW(%r1) /* Lower 8 bits only!! */
mfsp %sr0,%r2 mfsp %sr0,%r2
...@@ -255,7 +249,7 @@ tracesys_next: ...@@ -255,7 +249,7 @@ tracesys_next:
ldo R%sys_call_table(%r1), %r19 ldo R%sys_call_table(%r1), %r19
ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
LDREG 0(%r1), %r1 LDREG TI_TASK(%r1), %r1
LDREG TASK_PT_GR20(%r1), %r20 LDREG TASK_PT_GR20(%r1), %r20
LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */ LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */
LDREG TASK_PT_GR25(%r1), %r25 LDREG TASK_PT_GR25(%r1), %r25
...@@ -292,14 +286,14 @@ tracesys_next: ...@@ -292,14 +286,14 @@ tracesys_next:
tracesys_exit: tracesys_exit:
ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
LDREG 0(%r1), %r1 LDREG TI_TASK(%r1), %r1
#ifdef __LP64__ #ifdef __LP64__
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
bl syscall_trace, %r2 bl syscall_trace, %r2
STREG %r28,TASK_PT_GR28(%r1) /* save return value now */ STREG %r28,TASK_PT_GR28(%r1) /* save return value now */
ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
LDREG 0(%r1), %r1 LDREG TI_TASK(%r1), %r1
LDREG TASK_PT_GR28(%r1), %r28 /* Restore return val. */ LDREG TASK_PT_GR28(%r1), %r28 /* Restore return val. */
ldil L%syscall_exit,%r1 ldil L%syscall_exit,%r1
...@@ -332,11 +326,13 @@ tracesys_sigexit: ...@@ -332,11 +326,13 @@ tracesys_sigexit:
#define ENTRY_DIFF(_name_) .dword sys32_##_name_ #define ENTRY_DIFF(_name_) .dword sys32_##_name_
#define ENTRY_UHOH(_name_) .dword sys32_##unimplemented #define ENTRY_UHOH(_name_) .dword sys32_##unimplemented
#define ENTRY_OURS(_name_) .dword parisc_##_name_ #define ENTRY_OURS(_name_) .dword parisc_##_name_
#define ENTRY_COMP(_name_) .dword compat_sys_##_name_
#else #else
#define ENTRY_SAME(_name_) .word sys_##_name_ #define ENTRY_SAME(_name_) .word sys_##_name_
#define ENTRY_DIFF(_name_) .word sys_##_name_ #define ENTRY_DIFF(_name_) .word sys_##_name_
#define ENTRY_UHOH(_name_) .word sys_##_name_ #define ENTRY_UHOH(_name_) .word sys_##_name_
#define ENTRY_OURS(_name_) .word parisc_##_name_ #define ENTRY_OURS(_name_) .word parisc_##_name_
#define ENTRY_COMP(_name_) .word sys_##_name_
#endif #endif
.align 8 .align 8
...@@ -363,7 +359,7 @@ sys_call_table: ...@@ -363,7 +359,7 @@ sys_call_table:
ENTRY_SAME(lchown) ENTRY_SAME(lchown)
ENTRY_SAME(socket) ENTRY_SAME(socket)
/* struct stat is MAYBE identical wide and narrow ?? */ /* struct stat is MAYBE identical wide and narrow ?? */
ENTRY_DIFF(newstat) ENTRY_COMP(newstat)
ENTRY_DIFF(lseek) ENTRY_DIFF(lseek)
ENTRY_SAME(getpid) /* 20 */ ENTRY_SAME(getpid) /* 20 */
/* the 'void * data' parameter may need re-packing in wide */ /* the 'void * data' parameter may need re-packing in wide */
...@@ -378,10 +374,10 @@ sys_call_table: ...@@ -378,10 +374,10 @@ sys_call_table:
ENTRY_SAME(ptrace) ENTRY_SAME(ptrace)
ENTRY_SAME(alarm) ENTRY_SAME(alarm)
/* see stat comment */ /* see stat comment */
ENTRY_DIFF(newfstat) ENTRY_COMP(newfstat)
ENTRY_SAME(pause) ENTRY_SAME(pause)
/* struct utimbuf uses time_t which might vary */ /* struct utimbuf uses time_t which might vary */
ENTRY_DIFF(utime) /* 30 */ ENTRY_COMP(utime) /* 30 */
/* struct sockaddr... */ /* struct sockaddr... */
ENTRY_SAME(connect) ENTRY_SAME(connect)
ENTRY_SAME(listen) ENTRY_SAME(listen)
...@@ -396,7 +392,7 @@ sys_call_table: ...@@ -396,7 +392,7 @@ sys_call_table:
ENTRY_SAME(rmdir) /* 40 */ ENTRY_SAME(rmdir) /* 40 */
ENTRY_SAME(dup) ENTRY_SAME(dup)
ENTRY_SAME(pipe) ENTRY_SAME(pipe)
ENTRY_DIFF(times) ENTRY_COMP(times)
/* struct sockaddr... */ /* struct sockaddr... */
ENTRY_SAME(getsockname) ENTRY_SAME(getsockname)
/* it seems possible brk() could return a >4G pointer... */ /* it seems possible brk() could return a >4G pointer... */
...@@ -447,7 +443,7 @@ sys_call_table: ...@@ -447,7 +443,7 @@ sys_call_table:
ENTRY_SAME(sendto) ENTRY_SAME(sendto)
ENTRY_SAME(symlink) ENTRY_SAME(symlink)
/* see stat comment */ /* see stat comment */
ENTRY_DIFF(newlstat) ENTRY_COMP(newlstat)
ENTRY_SAME(readlink) /* 85 */ ENTRY_SAME(readlink) /* 85 */
/* suspect we'll need some work for narrow shlibs on wide kernel */ /* suspect we'll need some work for narrow shlibs on wide kernel */
/* NOTE this doesn't get used when I boot 32-bit userspace */ /* NOTE this doesn't get used when I boot 32-bit userspace */
...@@ -474,8 +470,8 @@ sys_call_table: ...@@ -474,8 +470,8 @@ sys_call_table:
ENTRY_SAME(syslog) ENTRY_SAME(syslog)
/* even though manpage says struct timeval contains longs, ours has /* even though manpage says struct timeval contains longs, ours has
* time_t and suseconds_t -- both of which are safe wide/narrow */ * time_t and suseconds_t -- both of which are safe wide/narrow */
ENTRY_DIFF(setitimer) ENTRY_COMP(setitimer)
ENTRY_DIFF(getitimer) /* 105 */ ENTRY_COMP(getitimer) /* 105 */
ENTRY_SAME(capget) ENTRY_SAME(capget)
ENTRY_SAME(capset) ENTRY_SAME(capset)
ENTRY_OURS(pread64) ENTRY_OURS(pread64)
...@@ -501,13 +497,10 @@ sys_call_table: ...@@ -501,13 +497,10 @@ sys_call_table:
ENTRY_SAME(mprotect) /* 125 */ ENTRY_SAME(mprotect) /* 125 */
/* old_sigset_t forced to 32 bits. Beware glibc sigset_t */ /* old_sigset_t forced to 32 bits. Beware glibc sigset_t */
ENTRY_DIFF(sigprocmask) ENTRY_DIFF(sigprocmask)
ENTRY_SAME(create_module) ENTRY_SAME(ni_syscall) /* create_module */
/* struct module contains longs, but insmod builds a 64 bit struct
* if running under a 64 bit kernel */
ENTRY_SAME(init_module) ENTRY_SAME(init_module)
ENTRY_SAME(delete_module) ENTRY_SAME(delete_module)
/* struct kernel_sym contains a long. Linus never heard of size_t? */ ENTRY_SAME(ni_syscall) /* 130: get_kernel_syms */
ENTRY_DIFF(get_kernel_syms) /* 130 */
/* time_t inside struct dqblk */ /* time_t inside struct dqblk */
ENTRY_DIFF(quotactl) /* -- FIXME, doesn't work */ ENTRY_DIFF(quotactl) /* -- FIXME, doesn't work */
ENTRY_SAME(getpgid) ENTRY_SAME(getpgid)
...@@ -551,13 +544,12 @@ sys_call_table: ...@@ -551,13 +544,12 @@ sys_call_table:
* carefully, like timeval for example (which is about the same). * carefully, like timeval for example (which is about the same).
* Unfortunately it contains a long :-( */ * Unfortunately it contains a long :-( */
ENTRY_DIFF(sched_rr_get_interval) ENTRY_DIFF(sched_rr_get_interval)
ENTRY_DIFF(nanosleep) ENTRY_COMP(nanosleep)
ENTRY_SAME(mremap) ENTRY_SAME(mremap)
ENTRY_SAME(setresuid) ENTRY_SAME(setresuid)
ENTRY_SAME(getresuid) /* 165 */ ENTRY_SAME(getresuid) /* 165 */
ENTRY_DIFF(sigaltstack_wrapper) ENTRY_DIFF(sigaltstack_wrapper)
/* struct passed back to user can contain long symbol values */ ENTRY_SAME(ni_syscall) /* query_module */
ENTRY_DIFF(query_module)
ENTRY_SAME(poll) ENTRY_SAME(poll)
/* structs contain pointers and an in_addr... */ /* structs contain pointers and an in_addr... */
ENTRY_DIFF(nfsservctl) ENTRY_DIFF(nfsservctl)
...@@ -609,11 +601,31 @@ sys_call_table: ...@@ -609,11 +601,31 @@ sys_call_table:
#else #else
ENTRY_SAME(ni_syscall) ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall) ENTRY_SAME(ni_syscall)
ENTRY_SAME(ni_syscall) ENTRY_SAME(ni_syscall) /* 205 */
#endif #endif
ENTRY_SAME(gettid) ENTRY_SAME(gettid)
ENTRY_SAME(readahead) ENTRY_SAME(readahead)
ENTRY_SAME(ni_syscall) /* tkill */ ENTRY_SAME(ni_syscall) /* tkill */
ENTRY_SAME(sendfile64)
ENTRY_SAME(futex) /* 210 */
ENTRY_SAME(sched_setaffinity)
ENTRY_SAME(sched_getaffinity)
ENTRY_SAME(set_thread_area)
ENTRY_SAME(get_thread_area)
ENTRY_SAME(io_setup) /* 215 */
ENTRY_SAME(io_destroy)
ENTRY_SAME(io_getevents)
ENTRY_SAME(io_submit)
ENTRY_SAME(io_cancel)
ENTRY_SAME(alloc_hugepages) /* 220 */
ENTRY_SAME(free_hugepages)
ENTRY_SAME(exit_group)
ENTRY_DIFF(lookup_dcookie)
ENTRY_SAME(epoll_create)
ENTRY_SAME(epoll_ctl) /* 225 */
ENTRY_SAME(epoll_wait)
ENTRY_SAME(remap_file_pages)
.end .end
/* Make sure nothing else is placed on this page */ /* Make sure nothing else is placed on this page */
......
...@@ -46,13 +46,29 @@ extern void smp_do_timer(struct pt_regs *regs); ...@@ -46,13 +46,29 @@ extern void smp_do_timer(struct pt_regs *regs);
#endif #endif
static inline void static inline void
parisc_do_profile(unsigned long pc) parisc_do_profile(struct pt_regs *regs)
{ {
unsigned long pc = regs->iaoq[0];
extern unsigned long prof_cpu_mask;
extern char _stext; extern char _stext;
#ifdef CONFIG_PROFILING
extern void parisc_profile_hook(struct pt_regs *);
parisc_profile_hook(regs);
#endif
if (user_mode(regs))
return;
if (!prof_buffer) if (!prof_buffer)
return; return;
#if 0
if (!((1 << smp_processor_id()) & prof_cpu_mask))
return;
#endif
pc -= (unsigned long) &_stext; pc -= (unsigned long) &_stext;
pc >>= prof_shift; pc >>= prof_shift;
/* /*
...@@ -67,13 +83,15 @@ parisc_do_profile(unsigned long pc) ...@@ -67,13 +83,15 @@ parisc_do_profile(unsigned long pc)
void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
long now = mfctl(16); long now;
long next_tick; long next_tick;
int nticks; int nticks;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
/* initialize next_tick to time at last clocktick */ parisc_do_profile(regs);
now = mfctl(16);
/* initialize next_tick to time at last clocktick */
next_tick = cpu_data[cpu].it_value; next_tick = cpu_data[cpu].it_value;
/* since time passes between the interrupt and the mfctl() /* since time passes between the interrupt and the mfctl()
...@@ -98,13 +116,6 @@ void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -98,13 +116,6 @@ void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
#endif #endif
if (cpu == 0) { if (cpu == 0) {
write_lock(&xtime_lock); write_lock(&xtime_lock);
#ifndef CONFIG_SMP
extern int pc_in_user_space;
if (!user_mode(regs))
parisc_do_profile(regs->iaoq[0]);
else
parisc_do_profile((unsigned long)&pc_in_user_space);
#endif
do_timer(regs); do_timer(regs);
write_unlock(&xtime_lock); write_unlock(&xtime_lock);
} }
...@@ -240,3 +251,4 @@ void __init time_init(void) ...@@ -240,3 +251,4 @@ void __init time_init(void)
xtime.tv_nsec = 0; xtime.tv_nsec = 0;
} }
} }
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/kallsyms.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -42,7 +43,7 @@ ...@@ -42,7 +43,7 @@
#define PRINT_USER_FAULTS /* (turn this on if you want user faults to be */ #define PRINT_USER_FAULTS /* (turn this on if you want user faults to be */
/* dumped to the console via printk) */ /* dumped to the console via printk) */
static int printbinary(char *buf, unsigned long x, int nbits) int printbinary(char *buf, unsigned long x, int nbits)
{ {
unsigned long mask = 1UL << (nbits - 1); unsigned long mask = 1UL << (nbits - 1);
while (mask != 0) { while (mask != 0) {
...@@ -192,6 +193,19 @@ void show_trace_task(struct task_struct *tsk) ...@@ -192,6 +193,19 @@ void show_trace_task(struct task_struct *tsk)
void die_if_kernel(char *str, struct pt_regs *regs, long err) void die_if_kernel(char *str, struct pt_regs *regs, long err)
{ {
if (user_mode(regs)) {
if (err == 0)
return; /* STFU */
printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n",
current->comm, current->pid, str, err, regs->iaoq[0]);
#ifdef PRINT_USER_FAULTS
/* XXX for debugging only */
show_regs(regs);
#endif
return;
}
/* Amuse the user in a SPARC fashion */ /* Amuse the user in a SPARC fashion */
printk( printk(
" _______________________________ \n" " _______________________________ \n"
...@@ -202,19 +216,6 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) ...@@ -202,19 +216,6 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
" (__)\\ )\\/\\\n" " (__)\\ )\\/\\\n"
" U ||----w |\n" " U ||----w |\n"
" || ||\n"); " || ||\n");
if (user_mode(regs)) {
#ifdef PRINT_USER_FAULTS
if (err == 0)
return; /* STFU */
/* XXX for debugging only */
printk(KERN_DEBUG "%s (pid %d): %s (code %ld)\n",
current->comm, current->pid, str, err);
show_regs(regs);
#endif
return;
}
/* unlock the pdc lock if necessary */ /* unlock the pdc lock if necessary */
pdc_emergency_unlock(); pdc_emergency_unlock();
......
This diff is collapsed.
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
* Assumes the device can cope with 32-bit transfers. If it can't, * Assumes the device can cope with 32-bit transfers. If it can't,
* don't use this function. * don't use this function.
*/ */
void memcpy_toio(unsigned long dest, const void *src, int count) void __memcpy_toio(unsigned long dest, unsigned long src, int count)
{ {
if ((dest & 3) != ((unsigned long)src & 3)) if ((dest & 3) != (src & 3))
goto bytecopy; goto bytecopy;
while (dest & 3) { while (dest & 3) {
writeb(*(char *)src, dest++); writeb(*(char *)src, dest++);
...@@ -25,7 +25,7 @@ void memcpy_toio(unsigned long dest, const void *src, int count) ...@@ -25,7 +25,7 @@ void memcpy_toio(unsigned long dest, const void *src, int count)
} }
while (count > 3) { while (count > 3) {
__raw_writel(*(u32 *)src, dest); __raw_writel(*(u32 *)src, dest);
(unsigned long) src += 4; src += 4;
dest += 4; dest += 4;
count -= 4; count -= 4;
} }
...@@ -49,13 +49,13 @@ void memcpy_toio(unsigned long dest, const void *src, int count) ...@@ -49,13 +49,13 @@ void memcpy_toio(unsigned long dest, const void *src, int count)
** Minimize total number of transfers at cost of CPU cycles. ** Minimize total number of transfers at cost of CPU cycles.
** TODO: only look at src alignment and adjust the stores to dest. ** TODO: only look at src alignment and adjust the stores to dest.
*/ */
void memcpy_fromio(void *dest, unsigned long src, int count) void __memcpy_fromio(unsigned long dest, unsigned long src, int count)
{ {
/* first compare alignment of src/dst */ /* first compare alignment of src/dst */
if ( (((unsigned long)dest ^ src) & 1) || (count < 2) ) if ( ((dest ^ src) & 1) || (count < 2) )
goto bytecopy; goto bytecopy;
if ( (((unsigned long)dest ^ src) & 2) || (count < 4) ) if ( ((dest ^ src) & 2) || (count < 4) )
goto shortcopy; goto shortcopy;
/* Then check for misaligned start address */ /* Then check for misaligned start address */
...@@ -101,7 +101,7 @@ void memcpy_fromio(void *dest, unsigned long src, int count) ...@@ -101,7 +101,7 @@ void memcpy_fromio(void *dest, unsigned long src, int count)
* Assumes the device can cope with 32-bit transfers. If it can't, * Assumes the device can cope with 32-bit transfers. If it can't,
* don't use this function. * don't use this function.
*/ */
void memset_io(unsigned long dest, char fill, int count) void __memset_io(unsigned long dest, char fill, int count)
{ {
u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill; u32 fill32 = (fill << 24) | (fill << 16) | (fill << 8) | fill;
while (dest & 3) { while (dest & 3) {
......
...@@ -86,8 +86,12 @@ handle_fpe(struct pt_regs *regs) ...@@ -86,8 +86,12 @@ handle_fpe(struct pt_regs *regs)
int signalcode; int signalcode;
/* need an intermediate copy of float regs because FPU emulation /* need an intermediate copy of float regs because FPU emulation
* code expects an artificial last entry which contains zero * code expects an artificial last entry which contains zero
*
* also, the passed in fr registers contain one word that defines
* the fpu type. the fpu type information is constructed
* inside the emulation code
*/ */
__u64 frcopy[33]; __u64 frcopy[36];
memcpy(frcopy, regs->fr, sizeof regs->fr); memcpy(frcopy, regs->fr, sizeof regs->fr);
frcopy[32] = 0; frcopy[32] = 0;
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "float.h" #include "float.h"
#include "types.h" #include "types.h"
#include <asm/processor.h>
/* #include <sys/debug.h> */ /* #include <sys/debug.h> */
/* #include <machine/sys/mdep_private.h> */ /* #include <machine/sys/mdep_private.h> */
...@@ -166,6 +167,20 @@ static void update_status_cbit(); ...@@ -166,6 +167,20 @@ static void update_status_cbit();
#define VASSERT(x) #define VASSERT(x)
static void parisc_linux_get_fpu_type(u_int fpregs[])
{
/* on pa-linux the fpu type is not filled in by the
* caller; it is constructed here
*/
if (boot_cpu_data.cpu_type == pcxs)
fpregs[FPU_TYPE_FLAG_POS] = TIMEX_EXTEN_FLAG;
else if (boot_cpu_data.cpu_type == pcxt ||
boot_cpu_data.cpu_type == pcxt_)
fpregs[FPU_TYPE_FLAG_POS] = ROLEX_EXTEN_FLAG;
else if (boot_cpu_data.cpu_type >= pcxu)
fpregs[FPU_TYPE_FLAG_POS] = PA2_0_FPU_FLAG;
}
/* /*
* this routine will decode the excepting floating point instruction and * this routine will decode the excepting floating point instruction and
* call the approiate emulation routine. * call the approiate emulation routine.
...@@ -184,6 +199,8 @@ fpudispatch(u_int ir, u_int excp_code, u_int holder, u_int fpregs[]) ...@@ -184,6 +199,8 @@ fpudispatch(u_int ir, u_int excp_code, u_int holder, u_int fpregs[])
/* All FP emulation code assumes that ints are 4-bytes in length */ /* All FP emulation code assumes that ints are 4-bytes in length */
VASSERT(sizeof(int) == 4); VASSERT(sizeof(int) == 4);
parisc_linux_get_fpu_type(fpregs);
fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS]; /* get fpu type flags */ fpu_type_flags=fpregs[FPU_TYPE_FLAG_POS]; /* get fpu type flags */
class = get_class(ir); class = get_class(ir);
......
...@@ -5,20 +5,12 @@ ...@@ -5,20 +5,12 @@
* Copyright (C) 2000 John Marvin (jsm@fc.hp.com) * Copyright (C) 2000 John Marvin (jsm@fc.hp.com)
*/ */
#include <linux/config.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/ptrace.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
const struct exception_table_entry *
extern const struct exception_table_entry __start___ex_table[]; search_extable(const struct exception_table_entry *first,
extern const struct exception_table_entry __stop___ex_table[]; const struct exception_table_entry *last,
unsigned long addr)
static inline const struct exception_table_entry *
search_one_table (const struct exception_table_entry *first,
const struct exception_table_entry *last,
unsigned long addr)
{ {
/* Abort early if the search value is out of range. */ /* Abort early if the search value is out of range. */
...@@ -43,27 +35,3 @@ search_one_table (const struct exception_table_entry *first, ...@@ -43,27 +35,3 @@ search_one_table (const struct exception_table_entry *first,
return 0; return 0;
} }
const struct exception_table_entry *
search_exception_table (unsigned long addr)
{
#ifndef CONFIG_MODULES
/* There is only the kernel to search. */
return search_one_table(__start___ex_table,
__stop___ex_table - 1,
addr);
#else
/* The kernel is the last "module" -- no need to treat it special. */
struct module *mp;
for (mp = module_list; mp ; mp = mp->next) {
const struct exception_table_entry *ret;
if (!mp->ex_table_start)
continue;
ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1,
addr);
if (ret)
return ret;
}
return 0;
#endif
}
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/traps.h> #include <asm/traps.h>
...@@ -230,7 +231,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, ...@@ -230,7 +231,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
if (!user_mode(regs)) { if (!user_mode(regs)) {
fix = search_exception_table(regs->iaoq[0]); fix = search_exception_tables(regs->iaoq[0]);
if (fix) { if (fix) {
......
menu "Profiling support"
depends on EXPERIMENTAL
config PROFILING
bool "Profiling support (EXPERIMENTAL)"
help
Say Y here to enable the extended profiling support mechanisms used
by profilers such as OProfile.
config OPROFILE
tristate "OProfile system profiling (EXPERIMENTAL)"
depends on PROFILING
help
OProfile is a profiling system capable of profiling the
whole system, include the kernel, kernel modules, libraries,
and applications.
If unsure, say N.
endmenu
obj-$(CONFIG_OPROFILE) += oprofile.o
DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
oprof.o cpu_buffer.o buffer_sync.o \
event_buffer.o oprofile_files.o \
oprofilefs.o oprofile_stats.o )
oprofile-y := $(DRIVER_OBJS) init.o timer_int.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment