Commit dc2d1881 authored by Linus Torvalds's avatar Linus Torvalds

Merge HP-PA update.

parents bf6735bf b731ec4f
This diff is collapsed.
...@@ -80,7 +80,6 @@ core-y += arch/parisc/kernel/pdc_cons.o \ ...@@ -80,7 +80,6 @@ core-y += arch/parisc/kernel/pdc_cons.o \
arch/parisc/kernel/init_task.o arch/parisc/kernel/init_task.o
libs-y += arch/parisc/lib/ \ libs-y += arch/parisc/lib/ \
`$(CC) -print-libgcc-file-name` `$(CC) -print-libgcc-file-name`
drivers-$(CONFIG_MATH_EMULATION) += arch/parisc/math-emu/
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 \
......
# #
# Makefile for the linux kernel. # Makefile for HPUX emulation
# #
obj-y := entry_hpux.o gate.o wrappers.o fs.o ioctl.o sys_hpux.o obj-y := entry_hpux.o gate.o wrappers.o fs.o ioctl.o sys_hpux.o
EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
This diff is collapsed.
...@@ -34,8 +34,7 @@ int hpux_execve(struct pt_regs *regs) ...@@ -34,8 +34,7 @@ int hpux_execve(struct pt_regs *regs)
} }
struct hpux_dirent { struct hpux_dirent {
long d_off_pad; /* we only have a 32-bit off_t */ loff_t d_off;
long d_off;
ino_t d_ino; ino_t d_ino;
short d_reclen; short d_reclen;
short d_namlen; short d_namlen;
...@@ -52,7 +51,8 @@ struct getdents_callback { ...@@ -52,7 +51,8 @@ struct getdents_callback {
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
static int filldir(void * __buf, const char * name, int namlen, loff_t offset, ino_t ino) static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
ino_t ino, unsigned d_type)
{ {
struct hpux_dirent * dirent; struct hpux_dirent * dirent;
struct getdents_callback * buf = (struct getdents_callback *) __buf; struct getdents_callback * buf = (struct getdents_callback *) __buf;
...@@ -96,7 +96,7 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int coun ...@@ -96,7 +96,7 @@ int hpux_getdents(unsigned int fd, struct hpux_dirent *dirent, unsigned int coun
buf.count = count; buf.count = count;
buf.error = 0; buf.error = 0;
error = vfs_readdir(file, &buf, filldir); error = vfs_readdir(file, filldir, &buf);
if (error < 0) if (error < 0)
goto out_putf; goto out_putf;
error = buf.error; error = buf.error;
...@@ -139,7 +139,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) ...@@ -139,7 +139,7 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
} }
long hpux_stat64(const char *path, struct hpux_stat64 *buf) long hpux_stat64(char *filename, struct hpux_stat64 *statbuf)
{ {
struct kstat stat; struct kstat stat;
int error = vfs_stat(filename, &stat); int error = vfs_stat(filename, &stat);
......
/* ------------------------------------------------------------------------------ /*
* *
* Linux/PARISC Project (http://www.thepuffingroup.com/parisc) * Linux/PARISC Project (http://www.parisc-linux.org/)
* *
* System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai> * System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai>
* Licensed under the GNU GPL. * Licensed under the GNU GPL.
...@@ -8,14 +8,23 @@ ...@@ -8,14 +8,23 @@
* sorry about the wall, puffin.. * sorry about the wall, puffin..
*/ */
#define __ASSEMBLY__
#include <asm/assembly.h> #include <asm/assembly.h>
#include <asm/offset.h> #include <asm/offsets.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/errno.h> #include <asm/errno.h>
#ifdef __LP64__
.level 2.0w
#else
.level 1.1
#endif
.text .text
#ifdef __LP64__
#define FRAME_SIZE 128
#else
#define FRAME_SIZE 64
#endif
.import hpux_call_table .import hpux_call_table
.import hpux_syscall_exit,code .import hpux_syscall_exit,code
.export hpux_gateway_page .export hpux_gateway_page
...@@ -23,35 +32,70 @@ ...@@ -23,35 +32,70 @@
.align 4096 .align 4096
hpux_gateway_page: hpux_gateway_page:
nop nop
mfsp %sr7,%r1 ;! we must set sr3 to the space
mtsp %r1,%sr3 ;! of the user before the gate
#ifdef __LP64__ #ifdef __LP64__
#warning NEEDS WORK for 64-bit #warning NEEDS WORK for 64-bit
#endif #endif
ldw -64(%r30), %r28 ;! 8th argument ldw -64(%r30), %r29 ;! 8th argument
ldw -60(%r30), %r19 ;! 7th argument ldw -60(%r30), %r19 ;! 7th argument
ldw -56(%r30), %r20 ;! 6th argument ldw -56(%r30), %r20 ;! 6th argument
ldw -52(%r30), %r21 ;! 5th argument ldw -52(%r30), %r21 ;! 5th argument
gate .+8, %r0 ;! become privileged gate .+8, %r0 /* become privileged */
mtsp %r0,%sr4 ;! get kernel space into sr4 mtsp %r0,%sr4 /* get kernel space into sr4 */
mtsp %r0,%sr5 ;! get kernel space into sr5 mtsp %r0,%sr5 /* get kernel space into sr5 */
mtsp %r0,%sr6 ;! get kernel space into sr6 mtsp %r0,%sr6 /* get kernel space into sr6 */
mtsp %r0,%sr7 ;! get kernel space into sr7 mfsp %sr7,%r1 /* save user sr7 */
mfctl %cr30,%r1 ;! get the kernel task ptr mtsp %r1,%sr3 /* and store it in sr3 */
mtctl %r0,%cr30 ;! zero it (flag)
STREG %r30,TASK_PT_GR30(%r1) ;! preserve userspace sp mtctl %r30,%cr28
STREG %r2,TASK_PT_GR2(%r1) ;! preserve rp mfctl %cr30,%r1
STREG %r27,TASK_PT_GR27(%r1) ;! user dp xor %r1,%r30,%r30 /* ye olde xor trick */
STREG %r31,TASK_PT_GR31(%r1) ;! preserve syscall return ptr xor %r1,%r30,%r1
xor %r1,%r30,%r30
ldo TASK_SZ_ALGN+FRAME_SIZE(%r30),%r30 /* set up kernel stack */
/* N.B.: It is critical that we don't set sr7 to 0 until r30
* contains a valid kernel stack pointer. It is also
* critical that we don't start using the kernel stack
* until after sr7 has been set to 0.
*/
mtsp %r0,%sr7 /* get kernel space into sr7 */
STREG %r1,TASK_PT_GR30-TASK_SZ_ALGN-FRAME_SIZE(%r30) /* save usp */
ldo -TASK_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr in %r1 */
/* Save some registers for sigcontext and potential task
switch (see entry.S for the details of which ones are
saved/restored). TASK_PT_PSW is zeroed so we can see whether
a process is on a syscall or not. For an interrupt the real
PSW value is stored. This is needed for gdb and sys_ptrace. */
STREG %r0, TASK_PT_PSW(%r1)
STREG %r2, TASK_PT_GR2(%r1) /* preserve rp */
STREG %r19, TASK_PT_GR19(%r1) /* 7th argument */
STREG %r20, TASK_PT_GR20(%r1) /* 6th argument */
STREG %r21, TASK_PT_GR21(%r1) /* 5th argument */
STREG %r22, TASK_PT_GR22(%r1) /* syscall # */
STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */
STREG %r24, TASK_PT_GR24(%r1) /* 3rd argument */
STREG %r25, TASK_PT_GR25(%r1) /* 2nd argument */
STREG %r26, TASK_PT_GR26(%r1) /* 1st argument */
STREG %r27, TASK_PT_GR27(%r1) /* user dp */
STREG %r28, TASK_PT_GR28(%r1) /* return value 0 */
STREG %r28, TASK_PT_ORIG_R28(%r1) /* return value 0 (saved for signals) */
STREG %r29, TASK_PT_GR29(%r1) /* 8th argument */
STREG %r31, TASK_PT_GR31(%r1) /* preserve syscall return ptr */
ldo TASK_PT_FR0(%r1), %r27 /* save fpregs from the kernel */
save_fp %r27 /* or potential task switch */
loadgp ;! setup kernel dp mfctl %cr11, %r27 /* i.e. SAR */
STREG %r27, TASK_PT_SAR(%r1)
ldo TASK_SZ_ALGN+64(%r1),%r30 ;! set up kernel stack loadgp
stw %r21, -52(%r30) ;! 5th argument stw %r21, -52(%r30) ;! 5th argument
stw %r20, -56(%r30) ;! 6th argument stw %r20, -56(%r30) ;! 6th argument
stw %r19, -60(%r30) ;! 7th argument stw %r19, -60(%r30) ;! 7th argument
stw %r28, -64(%r30) ;! 8th argument stw %r29, -64(%r30) ;! 8th argument
ldil L%hpux_call_table, %r21 ldil L%hpux_call_table, %r21
ldo R%hpux_call_table(%r21), %r21 ldo R%hpux_call_table(%r21), %r21
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
* TIOCSPGRP * TIOCSPGRP
*/ */
#include <linux/sched.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/ioctl.h> #include <asm/ioctl.h>
...@@ -54,10 +55,6 @@ int hpux_ioctl(int fd, unsigned long cmd, unsigned long arg) ...@@ -54,10 +55,6 @@ int hpux_ioctl(int fd, unsigned long cmd, unsigned long arg)
case 't': case 't':
result = hpux_ioctl_t(fd, cmd, arg); result = hpux_ioctl_t(fd, cmd, arg);
break; break;
default:
/* If my mother ever sees this, I hope she disowns me.
* Take this out after NYLWE. */
result = sys_ioctl(fd, cmd, arg);
} }
return result; return result;
} }
This diff is collapsed.
/*------------------------------------------------------------------------------ /*
* Native PARISC/Linux Project (http://www.puffingroup.com/parisc) * Linux/PARISC Project (http://www.parisc-linux.org/)
* *
* HP-UX System Call Wrapper routines and System Call Return Path * HP-UX System Call Wrapper routines and System Call Return Path
* *
...@@ -24,12 +24,11 @@ ...@@ -24,12 +24,11 @@
#warning Must be changed for PA64 #warning Must be changed for PA64
#endif #endif
#include <asm/offset.h> #include <asm/offsets.h>
.level 1.1 .level 1.1
.text .text
#define __ASSEMBLY__
#include <asm/assembly.h> #include <asm/assembly.h>
#include <asm/signal.h> #include <asm/signal.h>
...@@ -81,6 +80,7 @@ ...@@ -81,6 +80,7 @@
.export hpux_fork_wrapper .export hpux_fork_wrapper
.export hpux_child_return
.import sys_fork .import sys_fork
hpux_fork_wrapper: hpux_fork_wrapper:
...@@ -91,12 +91,10 @@ hpux_fork_wrapper: ...@@ -91,12 +91,10 @@ hpux_fork_wrapper:
stw %r2,-20(%r30) stw %r2,-20(%r30)
ldo 64(%r30),%r30 ldo 64(%r30),%r30
stw %r2,PT_GR19(%r1) ;! save for child stw %r2,PT_GR19(%r1) ;! save for child
stw %r30,PT_GR20(%r1) ;! save for child stw %r30,PT_GR21(%r1) ;! save for child
ldil L%child_return,%r3
ldo R%child_return(%r3),%r3
stw %r3,PT_GR21(%r1) ;! save for child
ldw TASK_PT_GR30(%r1),%r25 ldw PT_GR30(%r1),%r25
mtctl %r25,%cr29
copy %r1,%r24 copy %r1,%r24
bl sys_clone,%r2 bl sys_clone,%r2
ldi SIGCHLD,%r26 ldi SIGCHLD,%r26
...@@ -130,7 +128,12 @@ fork_exit: ...@@ -130,7 +128,12 @@ fork_exit:
/* Set the return value for the child */ /* Set the return value for the child */
child_return: hpux_child_return:
#if CONFIG_SMP || CONFIG_PREEMPT
bl schedule_tail, %r2
nop
#endif
ldw TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2 ldw TASK_PT_GR19-TASK_SZ_ALGN-128(%r30),%r2
b fork_return b fork_return
copy %r0,%r28 copy %r0,%r28
...@@ -242,3 +245,10 @@ hpux_syscall_exit: ...@@ -242,3 +245,10 @@ hpux_syscall_exit:
no_error: no_error:
b syscall_exit b syscall_exit
nop nop
.export hpux_unimplemented_wrapper
.import hpux_unimplemented
hpux_unimplemented_wrapper:
b hpux_unimplemented
stw %r22,-64(%r30) /* overwrite arg8 with syscall number */
# #
# Makefile for the linux kernel. # Makefile for arch/parisc/kernel
# #
ifdef CONFIG_PARISC64 ifdef CONFIG_PARISC64
...@@ -27,5 +27,3 @@ obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \ ...@@ -27,5 +27,3 @@ obj-$(CONFIG_PARISC64) += binfmt_elf32.o sys_parisc32.o \
ioctl32.o signal32.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
include $(TOPDIR)/Rules.make
...@@ -35,6 +35,7 @@ int main(void) ...@@ -35,6 +35,7 @@ int main(void)
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
DEFINE(TASK_MM, offsetof(struct task_struct, mm)); DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_PERSONALITY, offsetof(struct task_struct, personality)); DEFINE(TASK_PERSONALITY, offsetof(struct task_struct, personality));
DEFINE(TASK_PID, offsetof(struct task_struct, pid));
BLANK(); BLANK();
DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs)); DEFINE(TASK_REGS, offsetof(struct task_struct, thread.regs));
DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0])); DEFINE(TASK_PT_PSW, offsetof(struct task_struct, thread.regs.gr[ 0]));
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/gsc.h>
/* See comments in include/asm-parisc/pci.h */ /* See comments in include/asm-parisc/pci.h */
struct pci_dma_ops *hppa_dma_ops; struct pci_dma_ops *hppa_dma_ops;
......
...@@ -502,7 +502,6 @@ fault_vector_11: ...@@ -502,7 +502,6 @@ fault_vector_11:
.import handle_real_interruption,code .import handle_real_interruption,code
.import do_cpu_irq_mask,code .import do_cpu_irq_mask,code
.import parisc_stopkernel,code .import parisc_stopkernel,code
.import cpu_irq_region,data
/* /*
* r26 = function to be called * r26 = function to be called
...@@ -529,24 +528,29 @@ __kernel_thread: ...@@ -529,24 +528,29 @@ __kernel_thread:
ldd 24(%r26), %r2 ldd 24(%r26), %r2
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 */
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 */
STREG %r25, PT_GR25(%r1) STREG %r25, PT_GR25(%r1)
ldil L%CLONE_UNTRACED, %r26 ldil L%CLONE_UNTRACED, %r26
ldo CLONE_VM(%r26), %r26 /* Force CLONE_VM since only init_mm */ ldo CLONE_VM(%r26), %r26 /* Force CLONE_VM since only init_mm */
or %r26, %r24, %r26 /* will have kernel mappings. */ or %r26, %r24, %r26 /* will have kernel mappings. */
copy %r0, %r25 copy %r0, %r25 /* stack_start */
stw %r0, -52(%r30) /* user_tid */
#ifdef __LP64__ #ifdef __LP64__
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
bl do_fork, %r2 bl do_fork, %r2
copy %r1, %r24 copy %r1, %r24 /* pt_regs */
/* Parent Returns here */ /* Parent Returns here */
LDREG -PT_SZ_ALGN-RP_OFFSET(%r30), %r2 LDREG -PT_SZ_ALGN-RP_OFFSET(%r30), %r2
bv %r0(%r2)
ldo -PT_SZ_ALGN(%r30), %r30 ldo -PT_SZ_ALGN(%r30), %r30
bv %r0(%r2)
ldw TASK_PID(%r28), %r28
/* /*
* Child Returns here * Child Returns here
...@@ -568,6 +572,7 @@ ret_from_kernel_thread: ...@@ -568,6 +572,7 @@ ret_from_kernel_thread:
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
LDREG TASK_PT_GR22(%r1), %r22
#endif #endif
LDREG TASK_PT_GR26(%r1), %r1 LDREG TASK_PT_GR26(%r1), %r1
ble 0(%sr7, %r1) ble 0(%sr7, %r1)
...@@ -798,9 +803,9 @@ intr_do_resched: ...@@ -798,9 +803,9 @@ intr_do_resched:
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#endif #endif
ldil L%intr_return, %r2 ldil L%intr_check_sig, %r2
b schedule b schedule
ldo R%intr_return(%r2), %r2 /* return to intr_return, not here */ ldo R%intr_check_sig(%r2), %r2
.import do_signal,code .import do_signal,code
...@@ -815,11 +820,12 @@ intr_do_signal: ...@@ -815,11 +820,12 @@ intr_do_signal:
copy %r0, %r24 /* unsigned long in_syscall */ copy %r0, %r24 /* unsigned long in_syscall */
copy %r16, %r25 /* struct pt_regs *regs */ copy %r16, %r25 /* struct pt_regs *regs */
ssm PSW_SM_I, %r0
#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
#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 */
...@@ -862,26 +868,19 @@ intr_extint: ...@@ -862,26 +868,19 @@ intr_extint:
loadgp loadgp
copy %r29, %r25 /* arg1 is pt_regs */ copy %r29, %r26 /* arg0 is pt_regs */
copy %r29, %r16 /* save pt_regs */ copy %r29, %r16 /* save pt_regs */
ldil L%intr_return, %r2
#ifdef __LP64__ #ifdef __LP64__
ldo -16(%r30),%r29 /* Reference param save area */ ldo -16(%r30),%r29 /* Reference param save area */
#else
nop
#endif #endif
/*
* We need to either load the CPU's ID or IRQ region.
* Until we have "per CPU" IRQ regions, this is easy.
*/
ldil L%cpu_irq_region, %r26
ldil L%intr_return, %r2
ldo R%cpu_irq_region(%r26), %r26
b do_cpu_irq_mask b do_cpu_irq_mask
ldo R%intr_return(%r2), %r2 /* return to intr_return, not here */ ldo R%intr_return(%r2), %r2 /* return to intr_return, not here */
/* Generic interruptions (illegal insn, unaligned, page fault, etc) */ /* Generic interruptions (illegal insn, unaligned, page fault, etc) */
.export intr_save, code /* for os_hpmc */ .export intr_save, code /* for os_hpmc */
...@@ -955,11 +954,11 @@ skip_save_ior: ...@@ -955,11 +954,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_return, %r2 ldil L%intr_restore, %r2
copy %r25, %r16 /* save pt_regs */ copy %r25, %r16 /* save pt_regs */
b handle_interruption b handle_interruption
ldo R%intr_return(%r2), %r2 /* return to intr_return */ ldo R%intr_restore(%r2), %r2
/* /*
......
...@@ -403,7 +403,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = { ...@@ -403,7 +403,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
{HPHW_BA, 0x01B, 0x00078, 0x0, "Anole 100 VME BA"}, {HPHW_BA, 0x01B, 0x00078, 0x0, "Anole 100 VME BA"},
{HPHW_BA, 0x024, 0x00078, 0x0, "Fast Pace VME BA"}, {HPHW_BA, 0x024, 0x00078, 0x0, "Fast Pace VME BA"},
{HPHW_BA, 0x034, 0x00078, 0x0, "Anole T VME BA"}, {HPHW_BA, 0x034, 0x00078, 0x0, "Anole T VME BA"},
{HPHW_BA, 0x04A, 0x00078, 0x0, "Anole L2 132 BME BA"}, {HPHW_BA, 0x04A, 0x00078, 0x0, "Anole L2 132 VME BA"},
{HPHW_BA, 0x04C, 0x00078, 0x0, "Anole L2 165 VME BA"}, {HPHW_BA, 0x04C, 0x00078, 0x0, "Anole L2 165 VME BA"},
{HPHW_BA, 0x011, 0x00081, 0x0, "WB-96 Core BA"}, {HPHW_BA, 0x011, 0x00081, 0x0, "WB-96 Core BA"},
{HPHW_BA, 0x012, 0x00081, 0x0, "Orville UX Core BA"}, {HPHW_BA, 0x012, 0x00081, 0x0, "Orville UX Core BA"},
...@@ -805,8 +805,8 @@ static struct hp_hardware hp_hardware_list[] __initdata = { ...@@ -805,8 +805,8 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
{HPHW_FIO, 0x04E, 0x0007B, 0x0, "Kiji L2 132 Core Audio"}, {HPHW_FIO, 0x04E, 0x0007B, 0x0, "Kiji L2 132 Core Audio"},
{HPHW_FIO, 0x050, 0x0007B, 0x0, "Merlin Jr 132 Core Audio"}, {HPHW_FIO, 0x050, 0x0007B, 0x0, "Merlin Jr 132 Core Audio"},
{HPHW_FIO, 0x051, 0x0007B, 0x0, "Firehawk Audio"}, {HPHW_FIO, 0x051, 0x0007B, 0x0, "Firehawk Audio"},
{HPHW_FIO, 0x056, 0x0007B, 0x0, "Raven+ w SE FWSCSU Core Audio"}, {HPHW_FIO, 0x056, 0x0007B, 0x0, "Raven+ w SE FWSCSI Core Audio"},
{HPHW_FIO, 0x057, 0x0007B, 0x0, "Raven+ w Diff FWSCSU Core Audio"}, {HPHW_FIO, 0x057, 0x0007B, 0x0, "Raven+ w Diff FWSCSI Core Audio"},
{HPHW_FIO, 0x058, 0x0007B, 0x0, "FireHawk 200 Audio"}, {HPHW_FIO, 0x058, 0x0007B, 0x0, "FireHawk 200 Audio"},
{HPHW_FIO, 0x05C, 0x0007B, 0x0, "SummitHawk 230 Core Audio"}, {HPHW_FIO, 0x05C, 0x0007B, 0x0, "SummitHawk 230 Core Audio"},
{HPHW_FIO, 0x800, 0x0007B, 0x0, "Hitachi Tiny 64 Audio"}, {HPHW_FIO, 0x800, 0x0007B, 0x0, "Hitachi Tiny 64 Audio"},
......
...@@ -57,7 +57,7 @@ extern void ipi_interrupt(int, void *, struct pt_regs *); ...@@ -57,7 +57,7 @@ extern void ipi_interrupt(int, void *, struct pt_regs *);
/* Bits in EIEM correlate with cpu_irq_action[]. /* Bits in EIEM correlate with cpu_irq_action[].
** Numbered *Big Endian*! (ie bit 0 is MSB) ** Numbered *Big Endian*! (ie bit 0 is MSB)
*/ */
static unsigned long cpu_eiem = 0; static volatile unsigned long cpu_eiem = 0;
static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED; /* protect IRQ regions */ static spinlock_t irq_lock = SPIN_LOCK_UNLOCKED; /* protect IRQ regions */
...@@ -104,24 +104,35 @@ static inline void unmask_cpu_irq(void *unused, int irq) ...@@ -104,24 +104,35 @@ static inline void unmask_cpu_irq(void *unused, int irq)
set_eiem(cpu_eiem); set_eiem(cpu_eiem);
} }
static struct irqaction cpu_irq_actions[IRQ_PER_REGION] = { /*
* XXX cpu_irq_actions[] will become 2 dimensional for per CPU EIR support.
* correspond changes needed in:
* processor_probe() initialize additional action arrays
* request_irq() handle CPU IRQ region specially
* do_cpu_irq_mask() index into the matching irq_action array.
*/
struct irqaction cpu_irq_actions[IRQ_PER_REGION] = {
[IRQ_OFFSET(TIMER_IRQ)] { handler: timer_interrupt, name: "timer", }, [IRQ_OFFSET(TIMER_IRQ)] { handler: timer_interrupt, name: "timer", },
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
[IRQ_OFFSET(IPI_IRQ)] { handler: ipi_interrupt, name: "IPI", }, [IRQ_OFFSET(IPI_IRQ)] { handler: ipi_interrupt, name: "IPI", },
#endif #endif
}; };
struct irq_region cpu_irq_region = { struct irq_region_ops cpu_irq_ops = {
disable_cpu_irq, enable_cpu_irq, unmask_cpu_irq, unmask_cpu_irq
};
struct irq_region cpu0_irq_region = {
ops: { disable_cpu_irq, enable_cpu_irq, unmask_cpu_irq, unmask_cpu_irq }, ops: { disable_cpu_irq, enable_cpu_irq, unmask_cpu_irq, unmask_cpu_irq },
data: { dev: &cpu_data[0], data: { dev: &cpu_data[0],
name: "PA-CPU-00", name: "PARISC-CPU",
irqbase: IRQ_FROM_REGION(CPU_IRQ_REGION), }, irqbase: IRQ_FROM_REGION(CPU_IRQ_REGION), },
action: cpu_irq_actions, action: cpu_irq_actions,
}; };
struct irq_region *irq_region[NR_IRQ_REGS] = { struct irq_region *irq_region[NR_IRQ_REGS] = {
[ 0 ] NULL, /* reserved for EISA, else causes data page fault (aka code 15) */ [ 0 ] NULL, /* reserved for EISA, else causes data page fault (aka code 15) */
[ CPU_IRQ_REGION ] &cpu_irq_region, [ CPU_IRQ_REGION ] &cpu0_irq_region,
}; };
...@@ -192,10 +203,10 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -192,10 +203,10 @@ int show_interrupts(struct seq_file *p, void *v)
unsigned int regnr = 0; unsigned int regnr = 0;
seq_puts(p, " "); seq_puts(p, " ");
#if 0 /* def CONFIG_SMP */ #ifdef CONFIG_SMP
for (; regnr < smp_num_cpus; regnr++) for (regnr = 0; regnr < NR_CPUS; regnr++)
#endif #endif
seq_printf(p, " CPU%d ", regnr); seq_printf(p, " CPU%02d ", regnr);
#ifdef PARISC_IRQ_CR16_COUNTS #ifdef PARISC_IRQ_CR16_COUNTS
seq_printf(p, "[min/avg/max] (CPU cycle counts)"); seq_printf(p, "[min/avg/max] (CPU cycle counts)");
...@@ -216,24 +227,16 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -216,24 +227,16 @@ int show_interrupts(struct seq_file *p, void *v)
for (i = 0; i <= MAX_CPU_IRQ; i++) { for (i = 0; i <= MAX_CPU_IRQ; i++) {
struct irqaction *action = &region->action[i]; struct irqaction *action = &region->action[i];
unsigned int irq_no = IRQ_FROM_REGION(regnr) + i; unsigned int irq_no = IRQ_FROM_REGION(regnr) + i;
#if 0 /* def CONFIG_SMP */ int j=0;
/* We currently direct all Interrupts at the Monarch.
* The right way to handle SMP IRQ stats is to have one IRQ region/CPU.
*/
unsigned int j;
#endif
if (!action->handler) if (!action->handler)
continue; continue;
seq_printf(p, "%3d: ", irq_no); seq_printf(p, "%3d: ", irq_no);
#if 1 /* ndef CONFIG_SMP */ #ifdef CONFIG_SMP
seq_printf(p, "%10u ", kstat_irqs(irq_no)); for (; j < NR_CPUS; j++)
#else
for (j = 0; j < smp_num_cpus; j++)
seq_printf(p, "%10u ",
kstat_cpu(cpu_logical_map(j)).irqs[irq_no]);
#endif #endif
seq_printf(p, "%10u ", kstat.irqs[j][regnr][irq_no]);
seq_printf(p, " %14s", seq_printf(p, " %14s",
region->data.name ? region->data.name : "N/A"); region->data.name ? region->data.name : "N/A");
#ifndef PARISC_IRQ_CR16_COUNTS #ifndef PARISC_IRQ_CR16_COUNTS
...@@ -243,12 +246,12 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -243,12 +246,12 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, ", %s", action->name); seq_printf(p, ", %s", action->name);
#else #else
for ( ;action; action = action->next) { for ( ;action; action = action->next) {
unsigned int i, avg, min, max; unsigned int k, avg, min, max;
min = max = action->cr16_hist[0]; min = max = action->cr16_hist[0];
for (avg = i = 0; i < PARISC_CR16_HIST_SIZE; i++) { for (avg = k = 0; k < PARISC_CR16_HIST_SIZE; k++) {
int hist = action->cr16_hist[i]; int hist = action->cr16_hist[k];
if (hist) { if (hist) {
avg += hist; avg += hist;
...@@ -259,7 +262,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -259,7 +262,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (hist < min) min = hist; if (hist < min) min = hist;
} }
avg /= i; avg /= k;
seq_printf(p, " %s[%d/%d/%d]", action->name, seq_printf(p, " %s[%d/%d/%d]", action->name,
min,avg,max); min,avg,max);
} }
...@@ -292,7 +295,7 @@ txn_alloc_irq(void) ...@@ -292,7 +295,7 @@ txn_alloc_irq(void)
/* never return irq 0 cause that's the interval timer */ /* never return irq 0 cause that's the interval timer */
for (irq = 1; irq <= MAX_CPU_IRQ; irq++) { for (irq = 1; irq <= MAX_CPU_IRQ; irq++) {
if (cpu_irq_region.action[irq].handler == NULL) { if (cpu_irq_actions[irq].handler == NULL) {
return (IRQ_FROM_REGION(CPU_IRQ_REGION) + irq); return (IRQ_FROM_REGION(CPU_IRQ_REGION) + irq);
} }
} }
...@@ -314,14 +317,18 @@ txn_claim_irq(int irq) ...@@ -314,14 +317,18 @@ txn_claim_irq(int irq)
unsigned long unsigned long
txn_alloc_addr(int virt_irq) txn_alloc_addr(int virt_irq)
{ {
struct cpuinfo_parisc *dev = (struct cpuinfo_parisc *) (irq_region[IRQ_REGION(virt_irq)]->data.dev); static int next_cpu = -1;
if (!dev) { next_cpu++; /* assign to "next" CPU we want this bugger on */
printk(KERN_ERR "txn_alloc_addr(0x%x): CPU IRQ region? dev %p\n",
virt_irq,dev); /* validate entry */
return 0; while ((next_cpu < NR_CPUS) && !cpu_data[next_cpu].txn_addr)
} next_cpu++;
return (dev->txn_addr);
if (next_cpu >= NR_CPUS)
next_cpu = 0; /* nothing else, assign monarch */
return cpu_data[next_cpu].txn_addr;
} }
...@@ -365,7 +372,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs) ...@@ -365,7 +372,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
int cpu = smp_processor_id(); int cpu = smp_processor_id();
irq_enter(); irq_enter();
++kstat.irqs[IRQ_REGION(irq)][IRQ_OFFSET(irq)]; ++kstat.irqs[cpu][IRQ_REGION(irq)][IRQ_OFFSET(irq)];
DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq))); DBG_IRQ(irq, ("do_irq(%d) %d+%d\n", irq, IRQ_REGION(irq), IRQ_OFFSET(irq)));
...@@ -407,7 +414,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs) ...@@ -407,7 +414,7 @@ void do_irq(struct irqaction *action, int irq, struct pt_regs * regs)
/* ONLY called from entry.S:intr_extint() */ /* ONLY called from entry.S:intr_extint() */
void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs) void do_cpu_irq_mask(struct pt_regs *regs)
{ {
unsigned long eirr_val; unsigned long eirr_val;
unsigned int i=3; /* limit time in interrupt context */ unsigned int i=3; /* limit time in interrupt context */
...@@ -431,7 +438,7 @@ void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs) ...@@ -431,7 +438,7 @@ void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs)
*/ */
while ((eirr_val = (mfctl(23) & cpu_eiem)) && --i) { while ((eirr_val = (mfctl(23) & cpu_eiem)) && --i) {
unsigned long bit = (1UL<<MAX_CPU_IRQ); unsigned long bit = (1UL<<MAX_CPU_IRQ);
unsigned int irq = 0; unsigned int irq;
mtctl(eirr_val, 23); /* reset bits we are going to process */ mtctl(eirr_val, 23); /* reset bits we are going to process */
...@@ -440,17 +447,16 @@ void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs) ...@@ -440,17 +447,16 @@ void do_cpu_irq_mask(struct irq_region *region, struct pt_regs *regs)
printk(KERN_DEBUG "do_cpu_irq_mask %x\n", eirr_val); printk(KERN_DEBUG "do_cpu_irq_mask %x\n", eirr_val);
#endif #endif
for (; eirr_val && bit; bit>>=1, irq++) /* Work our way from MSb to LSb...same order we alloc EIRs */
for (irq = 0; eirr_val && bit; bit>>=1, irq++)
{ {
unsigned int irq_num; if (!(bit & eirr_val & cpu_eiem))
if (!(bit&eirr_val))
continue; continue;
/* clear bit in mask - can exit loop sooner */ /* clear bit in mask - can exit loop sooner */
eirr_val &= ~bit; eirr_val &= ~bit;
irq_num = region->data.irqbase + irq; do_irq(&cpu_irq_actions[irq], TIMER_IRQ+irq, regs);
do_irq(&region->action[irq], irq_num, regs);
} }
} }
set_eiem(cpu_eiem); set_eiem(cpu_eiem);
...@@ -675,6 +681,14 @@ void free_irq(unsigned int irq, void *dev_id) ...@@ -675,6 +681,14 @@ void free_irq(unsigned int irq, void *dev_id)
} }
#ifdef CONFIG_SMP
void synchronize_irq(unsigned int irqnum)
{
while (in_irq()) ;
}
#endif
/* /*
* IRQ autodetection code.. * IRQ autodetection code..
* *
......
# HP 712 kernel keymap. This uses 7 modifier combinations.
keymaps 0-2,4-5,8,12
# ie, plain, Shift, AltGr, Control, Control+Shift, Alt and Control+Alt
# Change the above line into
# keymaps 0-2,4-6,8,12
# in case you want the entries
# altgr control keycode 83 = Boot
# altgr control keycode 111 = Boot
# below.
#
# In fact AltGr is used very little, and one more keymap can
# be saved by mapping AltGr to Alt (and adapting a few entries):
# keycode 100 = Alt
#
keycode 1 = F9 F19 Console_21
control keycode 1 = F9
alt keycode 1 = Console_9
control alt keycode 1 = Console_9
keycode 2 =
keycode 3 = F5 F15 Console_17
control keycode 3 = F5
alt keycode 3 = Console_5
control alt keycode 3 = Console_5
keycode 4 = F3 F13 Console_15
control keycode 4 = F3
alt keycode 4 = Console_3
control alt keycode 4 = Console_3
keycode 5 = F1 F11 Console_13
control keycode 5 = F1
alt keycode 5 = Console_1
control alt keycode 5 = Console_1
keycode 6 = F2 F12 Console_14
control keycode 6 = F2
alt keycode 6 = Console_2
control alt keycode 6 = Console_2
keycode 7 = F12 F12 Console_24
control keycode 7 = F12
alt keycode 7 = Console_12
control alt keycode 7 = Console_12
keycode 8 =
keycode 9 = F10 F20 Console_22
control keycode 9 = F10
alt keycode 9 = Console_10
control alt keycode 9 = Console_10
keycode 10 = F8 F18 Console_20
control keycode 10 = F8
alt keycode 10 = Console_8
control alt keycode 10 = Console_8
keycode 11 = F6 F16 Console_18
control keycode 11 = F6
alt keycode 11 = Console_6
control alt keycode 11 = Console_6
keycode 12 = F4 F14 Console_16
control keycode 12 = F4
alt keycode 12 = Console_4
control alt keycode 12 = Console_4
keycode 13 = Tab Tab
alt keycode 13 = Meta_Tab
keycode 14 = grave asciitilde
control keycode 14 = nul
alt keycode 14 = Meta_grave
keycode 15 =
keycode 16 =
keycode 17 = Alt
keycode 18 = Shift
keycode 19 =
keycode 20 = Control
keycode 21 = q
keycode 22 = one exclam exclam
keycode 23 =
keycode 24 =
keycode 25 =
keycode 26 = z
keycode 27 = s
keycode 28 = a
altgr keycode 28 = Hex_A
keycode 29 = w
keycode 30 = two at at
keycode 31 =
keycode 32 =
keycode 33 = c
altgr keycode 46 = Hex_C
keycode 34 = x
keycode 35 = d
altgr keycode 35 = Hex_D
keycode 36 = e
altgr keycode 36 = Hex_E
keycode 37 = four dollar
keycode 38 = three numbersign
keycode 39 =
keycode 40 =
keycode 41 =
keycode 42 = v
keycode 43 = f
altgr keycode 43 = Hex_F
keycode 44 = t
keycode 45 = r
keycode 46 = five percent
keycode 47 =
keycode 48 =
keycode 49 = n
keycode 50 = b
altgr keycode 50 = Hex_B
keycode 51 = h
keycode 52 = g
keycode 53 = y
keycode 54 = six asciicircum
keycode 55 =
keycode 56 =
keycode 57 =
keycode 58 = m
keycode 59 = j
keycode 60 = u
keycode 61 = seven ampersand
keycode 62 = eight asterisk asterisk
keycode 63 =
keycode 64 =
keycode 65 = comma less
alt keycode 65 = Meta_comma
keycode 66 = k
keycode 67 = i
keycode 68 = o
keycode 69 = zero parenright bracketright
keycode 70 = nine parenleft bracketleft
keycode 71 =
keycode 72 =
keycode 73 = period greater
control keycode 73 = Compose
alt keycode 73 = Meta_period
keycode 74 = slash question
control keycode 74 = Delete
alt keycode 53 = Meta_slash
keycode 75 = l
keycode 76 = semicolon colon
alt keycode 39 = Meta_semicolon
keycode 77 = p
keycode 78 = minus underscore
keycode 79 =
keycode 80 =
keycode 81 =
keycode 82 = apostrophe quotedbl
control keycode 82 = Control_g
alt keycode 40 = Meta_apostrophe
keycode 83 =
keycode 84 = bracketleft braceleft
control keycode 84 = Escape
alt keycode 26 = Meta_bracketleft
keycode 85 = equal plus
keycode 86 =
keycode 87 =
keycode 88 = Caps_Lock
keycode 88 =
keycode 89 =
keycode 89 =
keycode 89 =
keycode 90 = Return
alt keycode 90 = Meta_Control_m
keycode 91 = bracketright braceright asciitilde
control keycode 91 = Control_bracketright
alt keycode 91 = Meta_bracketright
keycode 92 =
keycode 93 = backslash bar
control keycode 43 = Control_backslash
alt keycode 43 = Meta_backslash
keycode 94 =
keycode 95 =
keycode 96 =
keycode 97 =
keycode 98 =
keycode 99 =
keycode 100 =
keycode 101 =
keycode 102 = BackSpace
keycode 103 =
keycode 104 =
keycode 105 = KP_1
alt keycode 105 = Ascii_1
altgr keycode 105 = Hex_1
keycode 106 =
keycode 107 = KP_4
alt keycode 107 = Ascii_4
altgr keycode 107 = Hex_4
keycode 108 = KP_7
alt keycode 108 = Ascii_7
altgr keycode 108 = Hex_7
keycode 109 =
keycode 110 =
keycode 111 =
keycode 112 = KP_0
alt keycode 82 = Ascii_0
altgr keycode 82 = Hex_0
keycode 113 = KP_Period
keycode 114 = KP_2
alt keycode 114 = Ascii_2
altgr keycode 114 = Hex_2
keycode 115 = KP_5
alt keycode 115 = Ascii_5
altgr keycode 115 = Hex_5
keycode 116 = KP_6
alt keycode 116 = Ascii_6
altgr keycode 116 = Hex_6
keycode 117 = KP_8
alt keycode 117 = Ascii_8
altgr keycode 117 = Hex_8
keycode 118 = Escape
keycode 119 =
keycode 120 = F11
keycode 121 = KP_Add
keycode 122 = KP_3
alt keycode 122 = Ascii_3
altgr keycode 122 = Hex_3
keycode 123 = KP_Subtract
keycode 124 = KP_Multiply
keycode 125 = KP_9
alt keycode 125 = Ascii_9
altgr keycode 125 = Hex_9
keycode 126 =
# 131!!
keycode 127 = F7 F17 Console_19
control keycode 127 = F7
alt keycode 127 = Console_7
control alt keycode 127 = Console_7
string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
string F4 = "\033[[D"
string F5 = "\033[[E"
string F6 = "\033[17~"
string F7 = "\033[18~"
string F8 = "\033[19~"
string F9 = "\033[20~"
string F10 = "\033[21~"
string F11 = "\033[23~"
string F12 = "\033[24~"
string F13 = "\033[25~"
string F14 = "\033[26~"
string F15 = "\033[28~"
string F16 = "\033[29~"
string F17 = "\033[31~"
string F18 = "\033[32~"
string F19 = "\033[33~"
string F20 = "\033[34~"
string Find = "\033[1~"
string Insert = "\033[2~"
string Remove = "\033[3~"
string Select = "\033[4~"
string Prior = "\033[5~"
string Next = "\033[6~"
string Macro = "\033[M"
string Pause = "\033[P"
compose '`' 'A' to ''
compose '`' 'a' to ''
compose '\'' 'A' to ''
compose '\'' 'a' to ''
compose '^' 'A' to ''
compose '^' 'a' to ''
compose '~' 'A' to ''
compose '~' 'a' to ''
compose '"' 'A' to ''
compose '"' 'a' to ''
compose 'O' 'A' to ''
compose 'o' 'a' to ''
compose '0' 'A' to ''
compose '0' 'a' to ''
compose 'A' 'A' to ''
compose 'a' 'a' to ''
compose 'A' 'E' to ''
compose 'a' 'e' to ''
compose ',' 'C' to ''
compose ',' 'c' to ''
compose '`' 'E' to ''
compose '`' 'e' to ''
compose '\'' 'E' to ''
compose '\'' 'e' to ''
compose '^' 'E' to ''
compose '^' 'e' to ''
compose '"' 'E' to ''
compose '"' 'e' to ''
compose '`' 'I' to ''
compose '`' 'i' to ''
compose '\'' 'I' to ''
compose '\'' 'i' to ''
compose '^' 'I' to ''
compose '^' 'i' to ''
compose '"' 'I' to ''
compose '"' 'i' to ''
compose '-' 'D' to ''
compose '-' 'd' to ''
compose '~' 'N' to ''
compose '~' 'n' to ''
compose '`' 'O' to ''
compose '`' 'o' to ''
compose '\'' 'O' to ''
compose '\'' 'o' to ''
compose '^' 'O' to ''
compose '^' 'o' to ''
compose '~' 'O' to ''
compose '~' 'o' to ''
compose '"' 'O' to ''
compose '"' 'o' to ''
compose '/' 'O' to ''
compose '/' 'o' to ''
compose '`' 'U' to ''
compose '`' 'u' to ''
compose '\'' 'U' to ''
compose '\'' 'u' to ''
compose '^' 'U' to ''
compose '^' 'u' to ''
compose '"' 'U' to ''
compose '"' 'u' to ''
compose '\'' 'Y' to ''
compose '\'' 'y' to ''
compose 'T' 'H' to ''
compose 't' 'h' to ''
compose 's' 's' to ''
compose '"' 'y' to ''
compose 's' 'z' to ''
compose 'i' 'j' to ''
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <asm/gsc.h> #include <asm/io.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/machdep.h> #include <asm/machdep.h>
......
...@@ -79,13 +79,9 @@ extern int $global$; ...@@ -79,13 +79,9 @@ extern int $global$;
EXPORT_SYMBOL_NOVERS($global$); EXPORT_SYMBOL_NOVERS($global$);
#endif #endif
#include <asm/gsc.h>
EXPORT_SYMBOL(register_parisc_driver); EXPORT_SYMBOL(register_parisc_driver);
EXPORT_SYMBOL(unregister_parisc_driver); EXPORT_SYMBOL(unregister_parisc_driver);
EXPORT_SYMBOL(pdc_iodc_read); EXPORT_SYMBOL(pdc_iodc_read);
#ifdef CONFIG_GSC
EXPORT_SYMBOL(gsc_alloc_irq);
#endif
#include <asm/io.h> #include <asm/io.h>
EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(__ioremap);
......
/* arch/parisc/kernel/pdc.c - safe pdc access routines
*
* Copyright 1999 SuSE GmbH Nuernberg (Philipp Rumpf, prumpf@tux.org)
* portions Copyright 1999 The Puffin Group, (Alex deVries, David Kennedy)
*
* only these routines should be used out of the real kernel (i.e. everything
* using virtual addresses) for obvious reasons */
/* I think it would be in everyone's best interest to follow this
* guidelines when writing PDC wrappers:
*
* - the name of the pdc wrapper should match one of the macros
* used for the first two arguments
* - don't use caps for random parts of the name
* - use ASSERT_ALIGN to ensure the aligment of the arguments is
* correct
* - use __pa() to convert virtual (kernel) pointers to physical
* ones.
* - the name of the struct used for pdc return values should equal
* one of the macros used for the first two arguments to the
* corresponding PDC call
* - keep the order of arguments
* - don't be smart (setting trailing NUL bytes for strings, return
* something useful even if the call failed) unless you are sure
* it's not going to affect functionality or performance
*
* Example:
* int pdc_cache_info(struct pdc_cache_info *cache_info )
* {
* ASSERT_ALIGN(cache_info, 8);
*
* return mem_pdc_call(PDC_CACHE,PDC_CACHE_INFO,__pa(cache_info),0);
* }
* prumpf 991016
*/
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/page.h>
#include <asm/pdc.h>
#include <asm/real.h>
#include <asm/system.h>
#define ASSERT_ALIGN(ptr, align) \
do { if(((unsigned long)(ptr)) & (align-1)) { \
printk("PDC: %s:%d %s() called with " \
"unaligned argument from %p", __FILE__, __LINE__, \
__FUNCTION__, __builtin_return_address(0)); \
\
return -1; \
} } while(0)
/* verify address can be accessed without an HPMC */
int pdc_add_valid(void *address)
{
ASSERT_ALIGN(address, 4);
return mem_pdc_call(PDC_ADD_VALID, PDC_ADD_VALID_VERIFY, (unsigned long)address);
}
#if 0
int pdc_chassis_warn(struct pdc_chassis_warn *address)
{
ASSERT_ALIGN(address, 4);
return mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(address), 0);
}
#endif
int pdc_chassis_disp(unsigned long disp)
{
return mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp);
}
int pdc_chassis_info(void *pdc_result, void *chassis_info, unsigned long len)
{
ASSERT_ALIGN(pdc_result, 4);
ASSERT_ALIGN(chassis_info, 4);
return mem_pdc_call(PDC_CHASSIS,PDC_RETURN_CHASSIS_INFO,
__pa(pdc_result), __pa(chassis_info), len);
}
int pdc_hpa_processor(void *address)
{
/* We're using 0 for the last parameter just to make sure.
It's actually HVERSION dependant. And remember, life is
hard without a backspace. */
ASSERT_ALIGN(address, 4);
return mem_pdc_call(PDC_HPA, PDC_HPA_PROCESSOR, __pa(address),0);
}
#if 0
int pdc_hpa_modules(void *address)
{
return mem_pdc_call(PDC_HPA, PDC_HPA_MODULES, address);
}
#endif
int pdc_iodc_read(void *address, void * hpa, unsigned int index,
void * iodc_data, unsigned int iodc_data_size)
{
ASSERT_ALIGN(address, 4);
ASSERT_ALIGN(iodc_data, 8);
return mem_pdc_call(PDC_IODC, PDC_IODC_READ,
__pa(address), hpa, index, __pa(iodc_data), iodc_data_size);
}
int pdc_system_map_find_mods(void *pdc_mod_info,
void *mod_path, int index)
{
return mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_MODULE,
__pa(pdc_mod_info), __pa(mod_path), (long)index);
}
int pdc_model_info(struct pdc_model *model) {
ASSERT_ALIGN(model, 8);
return mem_pdc_call(PDC_MODEL,PDC_MODEL_INFO,__pa(model),0);
}
/* get system model name from PDC ROM (e.g. 9000/715 or 9000/778/B160L) */
int pdc_model_sysmodel(char * name)
{
struct pdc_model_sysmodel sys_model;
int retval;
ASSERT_ALIGN(&sys_model, 8);
ASSERT_ALIGN(name, 4);
sys_model.mod_len = 0;
retval = mem_pdc_call(PDC_MODEL,PDC_MODEL_SYSMODEL,__pa(&sys_model),
OS_ID_HPUX,__pa(name));
if (retval == PDC_RET_OK)
name[sys_model.mod_len] = '\0'; /* add trailing '\0' */
else
name[0] = 0;
return retval;
}
/* id: 0 = cpu revision, 1 = boot-rom-version */
int pdc_model_versions(struct pdc_model_cpuid *cpu_id, int id) {
return mem_pdc_call(PDC_MODEL,PDC_MODEL_VERSIONS,__pa(cpu_id),id);
}
int pdc_model_cpuid(struct pdc_model_cpuid *cpu_id) {
cpu_id->cpuid = 0; /* preset zero (call maybe not implemented!) */
return mem_pdc_call(PDC_MODEL,6,__pa(cpu_id),0); /* 6="return CPU ID" */
}
int pdc_cache_info(struct pdc_cache_info *cache_info) {
ASSERT_ALIGN(cache_info, 8);
return mem_pdc_call(PDC_CACHE,PDC_CACHE_INFO,__pa(cache_info),0);
}
#ifndef __LP64__
int pdc_btlb_info( struct pdc_btlb_info *btlb ) {
int status;
status = mem_pdc_call(PDC_BLOCK_TLB,PDC_BTLB_INFO,__pa(btlb),0);
if (status<0) btlb->max_size = 0;
return status;
}
int pdc_mem_map_hpa(void *r_addr, void *mod_path) {
return mem_pdc_call(PDC_MEM_MAP,PDC_MEM_MAP_HPA,
__pa(r_addr),__pa(mod_path));
}
int pdc_lan_station_id(char *lan_addr, void *net_hpa) {
struct pdc_lan_station_id id;
unsigned char *addr;
if (mem_pdc_call(PDC_LAN_STATION_ID, PDC_LAN_STATION_ID_READ,
__pa(&id), net_hpa) < 0)
addr = 0; /* FIXME: else read MAC from NVRAM */
else
addr = id.addr;
if (addr)
memmove( lan_addr, addr, PDC_LAN_STATION_ID_SIZE);
else
memset( lan_addr, 0, PDC_LAN_STATION_ID_SIZE);
return (addr != 0);
}
#endif
/* Similar to PDC_PAT stuff in pdcpat.c - but added for Forte/Allegro boxes */
int pdc_pci_irt_size(void *r_addr, void *hpa)
{
return mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE,
__pa(r_addr), hpa);
}
int pdc_pci_irt(void *r_addr, void *hpa, void *tbl)
{
return mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL,
__pa(r_addr), hpa, __pa(tbl));
}
/* access the TOD clock */
int pdc_tod_read(struct pdc_tod *tod)
{
ASSERT_ALIGN(tod, 8);
return mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(tod), 0);
}
int pdc_tod_set(unsigned long sec, unsigned long usec)
{
return mem_pdc_call(PDC_TOD, PDC_TOD_WRITE, sec, usec);
}
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/gsc.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/perf.h> #include <asm/perf.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 "perf_images.h" #include "perf_images.h"
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/gsc.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/pdc_chassis.h> #include <asm/pdc_chassis.h>
......
...@@ -167,12 +167,24 @@ static int __init processor_probe(struct parisc_device *dev) ...@@ -167,12 +167,24 @@ static int __init processor_probe(struct parisc_device *dev)
** p->state = STATE_RENDEZVOUS; ** p->state = STATE_RENDEZVOUS;
*/ */
#if 0
/* CPU 0 IRQ table is statically allocated/initialized */
if (cpuid) {
struct irqaction actions[];
/* /*
** itimer and ipi IRQ handlers are statically initialized in ** itimer and ipi IRQ handlers are statically initialized in
** arch/parisc/kernel/irq.c. ie Don't need to register them. ** arch/parisc/kernel/irq.c. ie Don't need to register them.
*/ */
p->region = irq_region[IRQ_FROM_REGION(CPU_IRQ_REGION)]; actions = kmalloc(sizeof(struct irqaction)*MAX_CPU_IRQ, GFP_ATOMIC);
if (!actions) {
/* not getting it's own table, share with monarch */
actions = cpu_irq_actions[0];
}
cpu_irq_actions[cpuid] = actions;
}
#endif
return 0; return 0;
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/security.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -101,6 +102,11 @@ long sys_ptrace(long request, pid_t pid, long addr, long data) ...@@ -101,6 +102,11 @@ long sys_ptrace(long request, pid_t pid, long addr, long data)
/* are we already being traced? */ /* are we already being traced? */
if (current->ptrace & PT_PTRACED) if (current->ptrace & PT_PTRACED)
goto out; goto out;
ret = security_ops->ptrace(current->parent, current);
if (ret)
goto out;
/* set the ptrace bit in the process flags. */ /* set the ptrace bit in the process flags. */
current->ptrace |= PT_PTRACED; current->ptrace |= PT_PTRACED;
ret = 0; ret = 0;
......
/*
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com)
*
* most of these calls might reasonably be moved to ../kernel -PB
*
* The basic principle is to construct a stack frame in C then call
* some assembly which adopts that stack, does some rfi magic, may
* switch wide/narrow mode, and calls the routine described by the
* 'fn' parameter WHICH IS NOT A FUNCTION POINTER!!!!!!!!!!!!!!!!
*/
#include <linux/spinlock.h>
#include <asm/system.h>
#include <stdarg.h>
#include <asm/pgtable.h> /* for __pa() */
#include <asm/pdc.h>
static spinlock_t pdc_lock = SPIN_LOCK_UNLOCKED;
/***************** 32-bit real-mode calls ***********/
/* The struct below is used
* to overlay real_stack (real2.S), preparing a 32-bit call frame.
* real32_call_asm() then uses this stack in narrow real mode
*/
struct narrow_stack {
/* use int, not long which is 64 bits */
unsigned int arg13;
unsigned int arg12;
unsigned int arg11;
unsigned int arg10;
unsigned int arg9;
unsigned int arg8;
unsigned int arg7;
unsigned int arg6;
unsigned int arg5;
unsigned int arg4;
unsigned int arg3;
unsigned int arg2;
unsigned int arg1;
unsigned int arg0;
unsigned int frame_marker[8];
unsigned int sp;
/* in reality, there's nearly 8k of stack after this */
};
long
real32_call(unsigned long fn, ...)
{
unsigned long r;
va_list args;
unsigned long flags;
extern struct narrow_stack real_stack;
extern unsigned long real32_call_asm(unsigned int *,
unsigned int *, unsigned int);
va_start(args, fn);
real_stack.arg0 = va_arg(args, unsigned int);
real_stack.arg1 = va_arg(args, unsigned int);
real_stack.arg2 = va_arg(args, unsigned int);
real_stack.arg3 = va_arg(args, unsigned int);
real_stack.arg4 = va_arg(args, unsigned int);
real_stack.arg5 = va_arg(args, unsigned int);
real_stack.arg6 = va_arg(args, unsigned int);
real_stack.arg7 = va_arg(args, unsigned int);
real_stack.arg8 = va_arg(args, unsigned int);
real_stack.arg9 = va_arg(args, unsigned int);
real_stack.arg10 = va_arg(args, unsigned int);
real_stack.arg11 = va_arg(args, unsigned int);
real_stack.arg12 = va_arg(args, unsigned int);
real_stack.arg13 = va_arg(args, unsigned int);
va_end(args);
if (fn == 0) {
/* mem_pdc call */
fn = PAGE0->mem_pdc;
}
spin_lock_irqsave(&pdc_lock, flags);
r = real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
spin_unlock_irqrestore(&pdc_lock, flags);
return r;
}
#ifdef __LP64__
/***************** 64-bit real-mode calls ***********/
struct wide_stack {
unsigned long arg0;
unsigned long arg1;
unsigned long arg2;
unsigned long arg3;
unsigned long arg4;
unsigned long arg5;
unsigned long arg6;
unsigned long arg7;
unsigned long arg8;
unsigned long arg9;
unsigned long arg10;
unsigned long arg11;
unsigned long arg12;
unsigned long arg13;
unsigned long frame_marker[2]; /* rp, previous sp */
unsigned long sp;
/* in reality, there's nearly 8k of stack after this */
};
long
real64_call(unsigned long fn, ...)
{
unsigned long r;
va_list args;
unsigned long flags;
extern struct wide_stack real_stack;
extern unsigned long real64_call_asm(unsigned long *,
unsigned long *, unsigned long);
va_start(args, fn);
real_stack.arg0 = va_arg(args, unsigned long);
real_stack.arg1 = va_arg(args, unsigned long);
real_stack.arg2 = va_arg(args, unsigned long);
real_stack.arg3 = va_arg(args, unsigned long);
real_stack.arg4 = va_arg(args, unsigned long);
real_stack.arg5 = va_arg(args, unsigned long);
real_stack.arg6 = va_arg(args, unsigned long);
real_stack.arg7 = va_arg(args, unsigned long);
real_stack.arg8 = va_arg(args, unsigned long);
real_stack.arg9 = va_arg(args, unsigned long);
real_stack.arg10 = va_arg(args, unsigned long);
real_stack.arg11 = va_arg(args, unsigned long);
real_stack.arg12 = va_arg(args, unsigned long);
real_stack.arg13 = va_arg(args, unsigned long);
va_end(args);
if (fn == 0) {
/* mem_pdc call */
fn = PAGE0->mem_pdc_hi;
fn <<= 32;
fn |= PAGE0->mem_pdc;
}
spin_lock_irqsave(&pdc_lock, flags);
r = real64_call_asm(&real_stack.sp, &real_stack.arg0, fn);
spin_unlock_irqrestore(&pdc_lock, flags);
return r;
}
#endif
...@@ -143,10 +143,8 @@ void __init setup_arch(char **cmdline_p) ...@@ -143,10 +143,8 @@ void __init setup_arch(char **cmdline_p)
dma_ops_init(); dma_ops_init();
#endif #endif
#ifdef CONFIG_VT #ifdef CONFIG_DUMMY_CONSOLE
# if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
conswitchp = &dummy_con; /* we use take_over_console() later ! */ conswitchp = &dummy_con; /* we use take_over_console() later ! */
# endif
#endif #endif
} }
......
...@@ -147,6 +147,40 @@ long sys_shmat_wrapper(int shmid, char *shmaddr, int shmflag) ...@@ -147,6 +147,40 @@ long sys_shmat_wrapper(int shmid, char *shmaddr, int shmflag)
} }
/* Fucking broken ABI */
extern asmlinkage long sys_truncate64(const char *, loff_t);
extern asmlinkage long sys_ftruncate64(unsigned int, loff_t);
extern asmlinkage ssize_t sys_pread64(unsigned int fd, char *buf,
size_t count, loff_t pos);
extern asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char *buf,
size_t count, loff_t pos);
asmlinkage long parisc_truncate64(const char * path,
unsigned int high, unsigned int low)
{
return sys_truncate(path, (loff_t)high << 32 | low);
}
asmlinkage long parisc_ftruncate64(unsigned int fd,
unsigned int high, unsigned int low)
{
return sys_ftruncate(fd, (loff_t)high << 32 | low);
}
asmlinkage ssize_t parisc_pread64(unsigned int fd, char *buf, size_t count,
unsigned int high, unsigned int low)
{
return sys_pread64(fd, buf, count, (loff_t)high << 32 | low);
}
asmlinkage ssize_t parisc_pwrite64(unsigned int fd, const char *buf,
size_t count, unsigned int high, unsigned int low)
{
return sys_pwrite64(fd, buf, count, (loff_t)high << 32 | low);
}
/* /*
* FIXME, please remove this crap as soon as possible * FIXME, please remove this crap as soon as possible
* *
......
...@@ -2743,20 +2743,8 @@ asmlinkage long sys32_msgrcv(int msqid, ...@@ -2743,20 +2743,8 @@ asmlinkage long sys32_msgrcv(int msqid,
/* LFS */ /* LFS */
extern asmlinkage long sys_truncate(const char *, loff_t);
extern asmlinkage long sys_ftruncate(unsigned int, loff_t);
extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long); extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);
asmlinkage long sys32_truncate64(const char * path, unsigned int high, unsigned int low)
{
return sys_truncate(path, (loff_t)high << 32 | low);
}
asmlinkage long sys32_ftruncate64(unsigned int fd, unsigned int high, unsigned int low)
{
return sys_ftruncate(fd, (loff_t)high << 32 | low);
}
asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg)
{ {
switch (cmd) { switch (cmd) {
......
...@@ -331,10 +331,12 @@ tracesys_sigexit: ...@@ -331,10 +331,12 @@ tracesys_sigexit:
#define ENTRY_SAME(_name_) .dword sys_##_name_ #define ENTRY_SAME(_name_) .dword sys_##_name_
#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_
#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_
#endif #endif
.align 8 .align 8
...@@ -476,8 +478,8 @@ sys_call_table: ...@@ -476,8 +478,8 @@ sys_call_table:
ENTRY_DIFF(getitimer) /* 105 */ ENTRY_DIFF(getitimer) /* 105 */
ENTRY_SAME(capget) ENTRY_SAME(capget)
ENTRY_SAME(capset) ENTRY_SAME(capset)
ENTRY_SAME(pread64) ENTRY_OURS(pread64)
ENTRY_SAME(pwrite64) ENTRY_OURS(pwrite64)
ENTRY_SAME(getcwd) /* 110 */ ENTRY_SAME(getcwd) /* 110 */
ENTRY_SAME(vhangup) ENTRY_SAME(vhangup)
ENTRY_SAME(fstat64) ENTRY_SAME(fstat64)
...@@ -596,8 +598,8 @@ sys_call_table: ...@@ -596,8 +598,8 @@ sys_call_table:
ENTRY_SAME(ni_syscall) /* streams1 */ ENTRY_SAME(ni_syscall) /* streams1 */
ENTRY_SAME(ni_syscall) /* streams2 */ ENTRY_SAME(ni_syscall) /* streams2 */
ENTRY_SAME(lstat64) ENTRY_SAME(lstat64)
ENTRY_DIFF(truncate64) ENTRY_OURS(truncate64)
ENTRY_DIFF(ftruncate64) /* 200 */ ENTRY_OURS(ftruncate64) /* 200 */
ENTRY_SAME(getdents64) ENTRY_SAME(getdents64)
ENTRY_DIFF(fcntl64) ENTRY_DIFF(fcntl64)
#ifdef CONFIG_XFS_FS #ifdef CONFIG_XFS_FS
......
# #
# Makefile for parisc-specific library files.. # Makefile for parisc-specific library files
# #
L_TARGET = lib.a
obj-y := lusercopy.o bitops.o checksum.o io.o memset.o obj-y := lusercopy.o bitops.o checksum.o io.o memset.o
include $(TOPDIR)/Rules.make
# #
# Makefile for the linux/parisc floating point code # Makefile for the linux/parisc floating point code
# #
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now in the main makefile...
obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \ obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \
dfmpy.o sfmpy.o sfsqrt.o dfsqrt.o dfadd.o fmpyfadd.o \ dfmpy.o sfmpy.o sfsqrt.o dfsqrt.o dfadd.o fmpyfadd.o \
...@@ -16,6 +11,4 @@ obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \ ...@@ -16,6 +11,4 @@ obj-y := frnd.o driver.o decode_exc.o fpudispatch.o denormal.o \
# Math emulation code beyond the FRND is required for 712/80i and # Math emulation code beyond the FRND is required for 712/80i and
# other very old or stripped-down PA-RISC CPUs -- not currently supported # other very old or stripped-down PA-RISC CPUs -- not currently supported
obj-$CONFIG_MATH_EMULATION += unimplemented-math-emulation.o obj-$(CONFIG_MATH_EMULATION) += unimplemented-math-emulation.o
include $(TOPDIR)/Rules.make
# #
# Makefile for the linux parisc-specific parts of the memory manager. # Makefile for arch/parisc/mm
# #
obj-y := init.o fault.o extable.o ioremap.o obj-y := init.o fault.o extable.o ioremap.o
include $(TOPDIR)/Rules.make
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
# #
obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_PCI) += pci/
obj-$(CONFIG_PARISC) += parisc/
obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_ACPI) += acpi/
obj-y += serial/ obj-y += serial/
obj-$(CONFIG_PARPORT) += parport/ obj-$(CONFIG_PARPORT) += parport/
......
...@@ -204,7 +204,7 @@ static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector, ...@@ -204,7 +204,7 @@ static int rd_blkdev_pagecache_IO(int rw, struct bio_vec *vec, sector_t sector,
kunmap(vec->bv_page); kunmap(vec->bv_page);
if (rw == READ) { if (rw == READ) {
flush_dcache_page(sbh->b_page); flush_dcache_page(vec->bv_page);
} else { } else {
SetPageDirty(page); SetPageDirty(page);
} }
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#include <asm/gsc.h>
#include <asm/cache.h> #include <asm/cache.h>
static char version[] __devinitdata = static char version[] __devinitdata =
......
menu "Bus options (PCI, PCMCIA, EISA, GSC, ISA)"
config GSC
bool "VSC/GSC/HSC bus support"
default y
help
The VSC, GSC and HSC busses were used from the earliest 700-series
workstations up to and including the C360/J2240 workstations. They
were also used in servers from the E-class to the K-class. They
are not found in B1000, C3000, J5000, A500, L1000, N4000 and upwards.
If in doubt, say "Y".
config IOMMU_CCIO
bool "U2/Uturn I/O MMU"
depends on GSC
help
Say Y here to enable DMA management routines for the first
generation of PA-RISC cache-coherent machines. Programs the
U2/Uturn chip in "Virtual Mode" and use the I/O MMU.
config GSC_LASI
bool "Lasi I/O support"
depends on GSC
help
Say Y here to directly support the Lasi controller chip found on
PA-RISC workstations. Linux-oriented documentation for this chip
can be found at <http://www.parisc-linux.org/documentation/>.
config GSC_WAX
bool "Wax I/O support"
depends on GSC
help
Say Y here to support the Wax GSC to EISA Bridge found in some older
systems, including B/C/D/R class. Some machines use Wax for other
purposes, such as providing one of the serial ports or being an
interface chip for an X.25 GSC card.
config EISA
bool "EISA support"
depends on GSC
help
Say Y here if you have an EISA bus in your machine. This code
supports both the Mongoose & Wax EISA adapters. It is sadly
incomplete and lacks support for card-to-host DMA.
config ISA
bool
depends on EISA
config PCI
bool "PCI support"
help
All recent HP machines have PCI slots, and you should say Y here
if you have a recent machine. If you are convinced you do not have
PCI slots in your machine (eg a 712), then you may say "N" here.
Beware that some GSC cards have a Dino onboard and PCI inside them,
so it may be safest to say "Y" anyway.
config GSC_DINO
bool "GSCtoPCI/Dino PCI support"
depends on PCI && GSC
help
Say Y here to support the Dino & Cujo GSC to PCI bridges found in
machines from the B132 to the C360, the J2240 and the A180. Some
GSC/HSC cards (eg gigabit & dual 100 Mbit Ethernet) have a Dino on
the card, and you also need to say Y here if you have such a card.
If in doubt, say Y.
config PCI_LBA
bool "LBA/Elroy PCI support"
depends on PCI
help
Say Y here to support the Elroy PCI Lower Bus Adapter. This is
present on B, C, J, L and N-class machines with 4-digit model
numbers and the A400/A500.
config IOSAPIC
bool
depends on PCI_LBA
default y
config IOMMU_SBA
bool
depends on PCI_LBA
default y
#config PCI_EPIC
# bool "EPIC/SAGA PCI support"
# depends on PCI
config SUPERIO
bool
depends on PCI
help
Say Y here to support the SuperIO chip found in Bxxxx, C3xxx and
J5xxx+ machines.
source "drivers/pci/Kconfig"
config CHASSIS_LCD_LED
bool "Chassis LCD and LED support"
endmenu
#
# Makefile for most of the non-PCI devices in PA-RISC machines
#
export-objs := gsc.o superio.o
obj-y := gsc.o power.o
obj-m :=
obj-n :=
obj- :=
obj-$(CONFIG_GSC_DINO) += dino.o
obj-$(CONFIG_GSC_LASI) += lasi.o asp.o
obj-$(CONFIG_GSC_WAX) += wax.o
obj-$(CONFIG_EISA) += eisa.o eisa_enumerator.o eisa_eeprom.o
obj-$(CONFIG_SUPERIO) += superio.o
obj-$(CONFIG_PCI_LBA) += lba_pci.o
# I/O SAPIC is also on IA64 platforms.
# The two could be merged into a common source some day.
obj-$(CONFIG_IOSAPIC) += iosapic.o
obj-$(CONFIG_IOMMU_SBA) += sba_iommu.o
# Only use one of them: ccio-rm-dma is for PCX-W systems *only*
# obj-$(CONFIG_IOMMU_CCIO) += ccio-rm-dma.o
obj-$(CONFIG_IOMMU_CCIO) += ccio-dma.o
obj-$(CONFIG_CHASSIS_LCD_LED) += led.o
/*
** HP VISUALIZE Workstation PCI Bus Defect
**
** "HP has discovered a potential system defect that can affect
** the behavior of five models of HP VISUALIZE workstations when
** equipped with third-party or customer-installed PCI I/O expansion
** cards. The defect is limited to the HP C180, C160, C160L, B160L,
** and B132L VISUALIZE workstations, and will only be encountered
** when data is transmitted through PCI I/O expansion cards on the
** PCI bus. HP-supplied graphics cards that utilize the PCI bus are
** not affected."
**
** REVISIT: "go/pci_defect" link below is stale.
** HP Internal can use <http://hpfcdma.fc.hp.com:80/Dino/>
**
** Product First Good Serial Number
** C200/C240 (US) US67350000
**B132L+/B180 (US) US67390000
** C200 (Europe) 3713G01000
** B180L (Europe) 3720G01000
**
** Note that many boards were fixed/replaced under a free replacement
** program. Assume a machine is only "suspect" until proven otherwise.
**
** "The pci_check program will also be available as application
** patch PHSS_12295"
*/
/*
* ASP Device Driver
*
* (c) Copyright 2000 The Puffin Group Inc.
*
* 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.
*
* by Helge Deller <deller@gmx.de>
*/
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <asm/io.h>
#include <asm/led.h>
#include "gsc.h"
#define ASP_GSC_IRQ 3 /* hardcoded interrupt for GSC */
#define ASP_VER_OFFSET 0x20 /* offset of ASP version */
#define ASP_LED_ADDR 0xf0800020
#define VIPER_INT_WORD 0xFFFBF088 /* addr of viper interrupt word */
static int asp_choose_irq(struct parisc_device *dev)
{
int irq = -1;
switch (dev->id.sversion) {
case 0x71: irq = 22; break; /* SCSI */
case 0x72: irq = 23; break; /* LAN */
case 0x73: irq = 30; break; /* HIL */
case 0x74: irq = 24; break; /* Centronics */
case 0x75: irq = (dev->hw_path == 4) ? 26 : 25; break; /* RS232 */
case 0x76: irq = 21; break; /* EISA BA */
case 0x77: irq = 20; break; /* Graphics1 */
case 0x7a: irq = 18; break; /* Audio (Bushmaster) */
case 0x7b: irq = 18; break; /* Audio (Scorpio) */
case 0x7c: irq = 28; break; /* FW SCSI */
case 0x7d: irq = 27; break; /* FDDI */
case 0x7f: irq = 18; break; /* Audio (Outfield) */
}
return irq;
}
/* There are two register ranges we're interested in. Interrupt /
* Status / LED are at 0xf080xxxx and Asp special registers are at
* 0xf082fxxx. PDC only tells us that Asp is at 0xf082f000, so for
* the purposes of interrupt handling, we have to tell other bits of
* the kernel to look at the other registers.
*/
#define ASP_INTERRUPT_ADDR 0xf0800000
int __init
asp_init_chip(struct parisc_device *dev)
{
struct busdevice *asp;
struct gsc_irq gsc_irq;
int irq, ret;
asp = kmalloc(sizeof(struct busdevice), GFP_KERNEL);
if(!asp)
return -ENOMEM;
asp->version = gsc_readb(dev->hpa + ASP_VER_OFFSET) & 0xf;
asp->name = (asp->version == 1) ? "Asp" : "Cutoff";
asp->hpa = ASP_INTERRUPT_ADDR;
printk(KERN_INFO "%s version %d at 0x%lx found.\n",
asp->name, asp->version, dev->hpa);
/* the IRQ ASP should use */
ret = -EBUSY;
irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ);
if (irq < 0) {
printk(KERN_ERR "%s(): cannot get GSC irq\n", __FUNCTION__);
goto out;
}
ret = request_irq(gsc_irq.irq, busdev_barked, 0, "asp", asp);
if (ret < 0)
goto out;
/* Save this for debugging later */
asp->parent_irq = gsc_irq.irq;
asp->eim = ((u32) gsc_irq.txn_addr) | gsc_irq.txn_data;
/* Program VIPER to interrupt on the ASP irq */
gsc_writel((1 << (31 - ASP_GSC_IRQ)),VIPER_INT_WORD);
/* Done init'ing, register this driver */
ret = gsc_common_irqsetup(dev, asp);
if (ret)
goto out;
fixup_child_irqs(dev, asp->busdev_region->data.irqbase, asp_choose_irq);
/* Mongoose is a sibling of Asp, not a child... */
fixup_child_irqs(dev->parent, asp->busdev_region->data.irqbase,
asp_choose_irq);
/* initialize the chassis LEDs */
#ifdef CONFIG_CHASSIS_LCD_LED
register_led_driver(DISPLAY_MODEL_OLD_ASP, LED_CMD_REG_NONE,
(char *)ASP_LED_ADDR);
#endif
return 0;
out:
kfree(asp);
return ret;
}
static struct parisc_device_id asp_tbl[] = {
{ HPHW_BA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00070 },
{ 0, }
};
struct parisc_driver asp_driver = {
name: "Asp",
id_table: asp_tbl,
probe: asp_init_chip,
};
...@@ -56,26 +56,6 @@ ...@@ -56,26 +56,6 @@
#define UTURN_IOA_RUNWAY 0x581 #define UTURN_IOA_RUNWAY 0x581
#define UTURN_BC_GSC 0x502 #define UTURN_BC_GSC 0x502
static int ccio_driver_callback(struct hp_device *, struct pa_iodc_driver *);
static struct pa_iodc_driver ccio_drivers_for[] = {
{HPHW_BCPORT, U2_BC_GSC, 0x0, 0xb, 0, 0x10,
DRIVER_CHECK_HVERSION +
DRIVER_CHECK_SVERSION + DRIVER_CHECK_HWTYPE,
MODULE_NAME, "U2 I/O MMU", (void *) ccio_driver_callback},
{HPHW_BCPORT, UTURN_BC_GSC, 0x0, 0xb, 0, 0x10,
DRIVER_CHECK_HVERSION +
DRIVER_CHECK_SVERSION + DRIVER_CHECK_HWTYPE,
MODULE_NAME, "Uturn I/O MMU", (void *) ccio_driver_callback},
{0,0,0,0,0,0,
0,
(char *) NULL, (char *) NULL, (void *) NULL }
};
#define IS_U2(id) ( \ #define IS_U2(id) ( \
(((id)->hw_type == HPHW_IOA) && ((id)->hversion == U2_IOA_RUNWAY)) || \ (((id)->hw_type == HPHW_IOA) && ((id)->hversion == U2_IOA_RUNWAY)) || \
(((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == U2_BC_GSC)) \ (((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == U2_BC_GSC)) \
...@@ -86,17 +66,10 @@ static struct pa_iodc_driver ccio_drivers_for[] = { ...@@ -86,17 +66,10 @@ static struct pa_iodc_driver ccio_drivers_for[] = {
(((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == UTURN_BC_GSC)) \ (((id)->hw_type == HPHW_BCPORT) && ((id)->hversion == UTURN_BC_GSC)) \
) )
void __init ccio_init(void)
{
register_driver(ccio_drivers_for);
}
static int ccio_dma_supported( struct pci_dev *dev, u64 mask) static int ccio_dma_supported( struct pci_dev *dev, u64 mask)
{ {
if (dev == NULL) { if (dev == NULL) {
printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
BUG(); BUG();
return(0); return(0);
} }
...@@ -182,8 +155,6 @@ static struct pci_dma_ops ccio_ops = { ...@@ -182,8 +155,6 @@ static struct pci_dma_ops ccio_ops = {
ccio_unmap_sg, ccio_unmap_sg,
NULL, /* dma_sync_single : NOP for U2 */ NULL, /* dma_sync_single : NOP for U2 */
NULL, /* dma_sync_sg : ditto */ NULL, /* dma_sync_sg : ditto */
}; };
...@@ -193,9 +164,11 @@ static struct pci_dma_ops ccio_ops = { ...@@ -193,9 +164,11 @@ static struct pci_dma_ops ccio_ops = {
** have work to do. ** have work to do.
*/ */
static int static int
ccio_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri) ccio_probe(struct parisc_device *dev)
{ {
printk("%s found %s at 0x%p\n", dri->name, dri->version, d->hpa); printk(KERN_INFO "%s found %s at 0x%lx\n", MODULE_NAME,
dev->id.hversion == U2_BC_GSC ? "U2" : "UTurn",
dev->hpa);
/* /*
** FIXME - should check U2 registers to verify it's really running ** FIXME - should check U2 registers to verify it's really running
...@@ -210,3 +183,20 @@ ccio_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri) ...@@ -210,3 +183,20 @@ ccio_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri)
hppa_dma_ops = &ccio_ops; hppa_dma_ops = &ccio_ops;
return 0; return 0;
} }
static struct parisc_device_id ccio_tbl[] = {
{ HPHW_BCPORT, HVERSION_REV_ANY_ID, U2_BC_GSC, 0xc },
{ HPHW_BCPORT, HVERSION_REV_ANY_ID, UTURN_BC_GSC, 0xc },
{ 0, }
};
static struct parisc_driver ccio_driver = {
name: "U2/Uturn",
id_table: ccio_tbl,
probe: ccio_probe,
};
void __init ccio_init(void)
{
register_parisc_driver(&ccio_driver);
}
This diff is collapsed.
This diff is collapsed.
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/eisa_eeprom.h>
#define EISA_EEPROM_MINOR 241
static unsigned long eeprom_addr;
static long long eisa_eeprom_llseek(struct file *file, loff_t offset, int origin )
{
switch (origin) {
case 0:
/* nothing to do */
break;
case 1:
offset += file->f_pos;
break;
case 2:
offset += HPEE_MAX_LENGTH;
break;
}
return (offset >= 0 && offset < HPEE_MAX_LENGTH) ? (file->f_pos = offset) : -EINVAL;
}
static ssize_t eisa_eeprom_read(struct file * file,
char *buf, size_t count, loff_t *ppos )
{
unsigned char *tmp;
ssize_t ret;
int i;
if (*ppos >= HPEE_MAX_LENGTH)
return 0;
count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;
tmp = kmalloc(count, GFP_KERNEL);
if (tmp) {
for (i = 0; i < count; i++)
tmp[i] = gsc_readb(eeprom_addr+(*ppos)++);
if (copy_to_user (buf, tmp, count))
ret = -EFAULT;
else
ret = count;
kfree (tmp);
} else
ret = -ENOMEM;
return ret;
}
static int eisa_eeprom_ioctl(struct inode *inode, struct file *file,
unsigned int cmd,
unsigned long arg)
{
return -ENOTTY;
}
static int eisa_eeprom_open(struct inode *inode, struct file *file)
{
if (file->f_mode & 2 || eeprom_addr == 0)
return -EINVAL;
return 0;
}
static int eisa_eeprom_release(struct inode *inode, struct file *file)
{
return 0;
}
/*
* The various file operations we support.
*/
static struct file_operations eisa_eeprom_fops = {
owner: THIS_MODULE,
llseek: eisa_eeprom_llseek,
read: eisa_eeprom_read,
ioctl: eisa_eeprom_ioctl,
open: eisa_eeprom_open,
release: eisa_eeprom_release,
};
static struct miscdevice eisa_eeprom_dev=
{
EISA_EEPROM_MINOR,
"eisa eeprom",
&eisa_eeprom_fops
};
int __init eisa_eeprom_init(unsigned long addr)
{
if (addr) {
eeprom_addr = addr;
misc_register(&eisa_eeprom_dev);
printk(KERN_INFO "EISA EEPROM at 0x%lx\n", eeprom_addr);
}
return 0;
}
MODULE_LICENSE("GPL");
This diff is collapsed.
This diff is collapsed.
/*
* drivers/parisc/gsc.h
* Declarations for functions in gsc.c
* Copyright (c) 2000-2002 Helge Deller, Matthew Wilcox
*
* Distributed under the terms of the GPL, version 2
*/
#include <linux/interrupt.h>
#include <asm/hardware.h>
#define OFFSET_IRR 0x0000 /* Interrupt request register */
#define OFFSET_IMR 0x0004 /* Interrupt mask register */
#define OFFSET_IPR 0x0008 /* Interrupt pending register */
#define OFFSET_ICR 0x000C /* Interrupt control register */
#define OFFSET_IAR 0x0010 /* Interrupt address register */
/* PA I/O Architected devices support at least 5 bits in the EIM register. */
#define GSC_EIM_WIDTH 5
struct gsc_irq {
unsigned long txn_addr; /* IRQ "target" */
int txn_data; /* HW "IRQ" */
int irq; /* virtual IRQ */
};
struct busdevice {
struct parisc_device *gsc;
unsigned long hpa;
char *name;
int version;
int type;
int parent_irq;
int eim;
struct irq_region *busdev_region;
};
/* short cut to keep the compiler happy */
#define BUSDEV_DEV(x) ((struct busdevice *) (x))
int gsc_common_irqsetup(struct parisc_device *parent, struct busdevice *busdev);
extern int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
extern int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
void busdev_barked(int busdev_irq, void *dev, struct pt_regs *regs);
...@@ -111,22 +111,25 @@ struct vector_info { ...@@ -111,22 +111,25 @@ struct vector_info {
struct irt_entry *vi_irte; /* IRT entry */ struct irt_entry *vi_irte; /* IRT entry */
u32 *vi_eoi_addr; /* precalculate EOI reg address */ u32 *vi_eoi_addr; /* precalculate EOI reg address */
u32 vi_eoi_data; /* IA64: ? PA: swapped txn_data */ u32 vi_eoi_data; /* IA64: ? PA: swapped txn_data */
u8 vi_status; /* status/flags */
u8 vi_irqline; /* INTINn(IRQ) */
int vi_txn_irq; /* virtual IRQ number for processor */ int vi_txn_irq; /* virtual IRQ number for processor */
ulong vi_txn_addr; /* IA64: id_eid PA: partial HPA */ ulong vi_txn_addr; /* IA64: id_eid PA: partial HPA */
ulong vi_txn_data; /* IA64: vector PA: EIR bit */ ulong vi_txn_data; /* IA64: vector PA: EIR bit */
u8 vi_status; /* status/flags */
u8 vi_irqline; /* INTINn(IRQ) */
char vi_name[32]; /* user visible identity */
}; };
struct iosapic_info { struct iosapic_info {
struct iosapic_info *isi_next; /* list of I/O SAPIC */ struct iosapic_info *isi_next; /* list of I/O SAPIC */
volatile void *isi_hpa; /* physical base address */ unsigned long isi_hpa; /* physical base address */
struct irq_region *isi_region; /* each I/O SAPIC is one region */ struct irq_region *isi_region; /* each I/O SAPIC is one region */
struct vector_info *isi_vector; /* IRdT (IRQ line) array */ struct vector_info *isi_vector; /* IRdT (IRQ line) array */
int isi_num_vectors; /* size of IRdT array */ int isi_num_vectors; /* size of IRdT array */
int isi_status; /* status/flags */ int isi_status; /* status/flags */
unsigned int isi_version; /* DEBUG: data fr version reg */ unsigned int isi_version; /* DEBUG: data fr version reg */
/* round up to next cacheline */
char isi_name[20]; /* identify region for users */
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -29,6 +29,7 @@ obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o ...@@ -29,6 +29,7 @@ obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o
obj-y += binfmt_script.o obj-y += binfmt_script.o
obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o
obj-$(CONFIG_BINFMT_SOM) += binfmt_som.o
obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.o obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.o
obj-$(CONFIG_FS_MBCACHE) += mbcache.o obj-$(CONFIG_FS_MBCACHE) += mbcache.o
......
This diff is collapsed.
/* $Id: dma.h,v 1.1 2002/07/20 15:52:25 rhirst Exp $ /* $Id: dma.h,v 1.2 1999/04/27 00:46:18 deller Exp $
* linux/include/asm/dma.h: Defines for using and allocating dma channels. * linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992. * Written by Hennus Bergman, 1992.
* High DMA channel support & info by Hannu Savolainen * High DMA channel support & info by Hannu Savolainen
...@@ -177,11 +177,7 @@ static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) ...@@ -177,11 +177,7 @@ static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
} }
#define free_dma(dmanr)
/* These are in kernel/dma.c: */
extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */
extern void free_dma(unsigned int dmanr); /* release it again */
extern int get_dma_list(char *buf); /* proc/dma support */
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
extern int isa_dma_bridge_buggy; extern int isa_dma_bridge_buggy;
......
#ifndef ASM_PARISC_GSC_H
#define ASM_PARISC_GSC_H
#ifdef __KERNEL__
#include <linux/types.h>
#include <asm/io.h> /* temporary for __raw_{read,write} */
/* Please, call ioremap and use {read,write}[bwl] instead. These functions
* are not very fast.
*/
#define gsc_readb(x) __raw_readb((unsigned long)x)
#define gsc_readw(x) __raw_readw((unsigned long)x)
#define gsc_readl(x) __raw_readl((unsigned long)x)
#define gsc_writeb(x, y) __raw_writeb(x, (unsigned long)y)
#define gsc_writew(x, y) __raw_writew(x, (unsigned long)y)
#define gsc_writel(x, y) __raw_writel(x, (unsigned long)y)
struct gsc_irq {
unsigned long txn_addr; /* IRQ "target" */
int txn_data; /* HW "IRQ" */
int irq; /* virtual IRQ */
};
/* PA I/O Architected devices support at least 5 bits in the EIM register. */
#define GSC_EIM_WIDTH 5
extern int gsc_alloc_irq(struct gsc_irq *dev); /* dev needs an irq */
extern int gsc_claim_irq(struct gsc_irq *dev, int irq); /* dev needs this irq */
#endif /* __KERNEL__ */
#endif /* LINUX_GSC_H */
...@@ -182,6 +182,18 @@ extern void memset_io(unsigned long dest, char fill, int count); ...@@ -182,6 +182,18 @@ extern void memset_io(unsigned long dest, char fill, int count);
#define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), EISA_BASE | (b), (c)) #define isa_memcpy_fromio(a,b,c) memcpy_fromio((a), EISA_BASE | (b), (c))
#define isa_memcpy_toio(a,b,c) memcpy_toio(EISA_BASE | (a), (b), (c)) #define isa_memcpy_toio(a,b,c) memcpy_toio(EISA_BASE | (a), (b), (c))
/*
* These functions support PA-RISC drivers which don't yet call ioremap().
* They will disappear once the last of these drivers is gone.
*/
#define gsc_readb(x) __raw_readb((unsigned long)x)
#define gsc_readw(x) __raw_readw((unsigned long)x)
#define gsc_readl(x) __raw_readl((unsigned long)x)
#define gsc_writeb(x, y) __raw_writeb(x, (unsigned long)y)
#define gsc_writew(x, y) __raw_writew(x, (unsigned long)y)
#define gsc_writel(x, y) __raw_writel(x, (unsigned long)y)
/* /*
* XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later. Presently * just copy it. The net code will then do the checksum later. Presently
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define POLLWRNORM 0x0100 #define POLLWRNORM 0x0100
#define POLLWRBAND 0x0200 #define POLLWRBAND 0x0200
#define POLLMSG 0x0400 #define POLLMSG 0x0400
#define POLLREMOVE 0x1000
struct pollfd { struct pollfd {
int fd; int fd;
......
...@@ -73,10 +73,8 @@ struct system_cpuinfo_parisc { ...@@ -73,10 +73,8 @@ struct system_cpuinfo_parisc {
** Per CPU data structure - ie varies per CPU. ** Per CPU data structure - ie varies per CPU.
*/ */
struct cpuinfo_parisc { struct cpuinfo_parisc {
unsigned long it_value; /* Interval Timer at last timer Intr */
struct irq_region *region; unsigned long it_delta; /* Interval delta (tic_10ms / HZ * 100) */
unsigned long it_value; /* Interval Timer value at last timer Intr */
unsigned long it_delta; /* Interval Timer delta (tic_10ms / HZ * 100) */
unsigned long irq_count; /* number of IRQ's since boot */ unsigned long irq_count; /* number of IRQ's since boot */
unsigned long irq_max_cr16; /* longest time to handle a single IRQ */ unsigned long irq_max_cr16; /* longest time to handle a single IRQ */
unsigned long cpuid; /* aka slot_number or set to NO_PROC_ID */ unsigned long cpuid; /* aka slot_number or set to NO_PROC_ID */
......
...@@ -63,6 +63,7 @@ enum { ...@@ -63,6 +63,7 @@ enum {
PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
PER_OSF4 = 0x000f, /* OSF/1 v4 */ PER_OSF4 = 0x000f, /* OSF/1 v4 */
PER_HPUX = 0x0010,
PER_MASK = 0x00ff, PER_MASK = 0x00ff,
}; };
......
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