Commit 713c0515 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  arch/parisc/kernel/perf_asm.S: build fix
  parisc: remove -traditional from assembler flags
  parisc: use conditional macro for 64-bit wide ops
  parisc: Remove ioctl.h content picked up from <asm-generic/ioctl.h>.
  arch/parisc/kernel/unaligned.c: use time_* macros
  parisc: remove redundant display of free swap space in show_mem()
  drivers/parisc: replace remaining __FUNCTION__ occurrences
  parisc: replace remaining __FUNCTION__ occurrences
  parisc: new termios definitions
  parisc: fix trivial section name warnings
parents 8f40f672 c913f94d
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
.level LEVEL .level LEVEL
.text __HEAD
.import hpux_call_table .import hpux_call_table
.import hpux_syscall_exit,code .import hpux_syscall_exit,code
......
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
#include <asm/assembly.h> #include <asm/assembly.h>
#include <asm/signal.h> #include <asm/signal.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
.level LEVEL .level LEVEL
.text __HEAD
/* These should probably go in a header file somewhere. /* These should probably go in a header file somewhere.
* They are duplicated in kernel/wrappers.S * They are duplicated in kernel/wrappers.S
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
extra-y := init_task.o head.o vmlinux.lds extra-y := init_task.o head.o vmlinux.lds
AFLAGS_entry.o := -traditional
AFLAGS_pacache.o := -traditional
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 \
ptrace.o hardware.o inventory.o drivers.o \ ptrace.o hardware.o inventory.o drivers.o \
......
...@@ -38,18 +38,11 @@ ...@@ -38,18 +38,11 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
#define CMPIB cmpib,*
#define CMPB cmpb,*
#define COND(x) *x
.level 2.0w .level 2.0w
#else #else
#define CMPIB cmpib,
#define CMPB cmpb,
#define COND(x) x
.level 2.0 .level 2.0
#endif #endif
...@@ -629,7 +622,7 @@ ...@@ -629,7 +622,7 @@
* the static part of the kernel address space. * the static part of the kernel address space.
*/ */
.text __HEAD
.align PAGE_SIZE .align PAGE_SIZE
...@@ -957,9 +950,9 @@ intr_check_sig: ...@@ -957,9 +950,9 @@ intr_check_sig:
* Only do signals if we are returning to user space * Only do signals if we are returning to user space
*/ */
LDREG PT_IASQ0(%r16), %r20 LDREG PT_IASQ0(%r16), %r20
CMPIB=,n 0,%r20,intr_restore /* backward */ cmpib,COND(=),n 0,%r20,intr_restore /* backward */
LDREG PT_IASQ1(%r16), %r20 LDREG PT_IASQ1(%r16), %r20
CMPIB=,n 0,%r20,intr_restore /* backward */ cmpib,COND(=),n 0,%r20,intr_restore /* backward */
copy %r0, %r25 /* long in_syscall = 0 */ copy %r0, %r25 /* long in_syscall = 0 */
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
...@@ -1013,10 +1006,10 @@ intr_do_resched: ...@@ -1013,10 +1006,10 @@ intr_do_resched:
* we jump back to intr_restore. * we jump back to intr_restore.
*/ */
LDREG PT_IASQ0(%r16), %r20 LDREG PT_IASQ0(%r16), %r20
CMPIB= 0, %r20, intr_do_preempt cmpib,COND(=) 0, %r20, intr_do_preempt
nop nop
LDREG PT_IASQ1(%r16), %r20 LDREG PT_IASQ1(%r16), %r20
CMPIB= 0, %r20, intr_do_preempt cmpib,COND(=) 0, %r20, intr_do_preempt
nop nop
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
...@@ -1045,7 +1038,7 @@ intr_do_preempt: ...@@ -1045,7 +1038,7 @@ intr_do_preempt:
/* current_thread_info()->preempt_count */ /* current_thread_info()->preempt_count */
mfctl %cr30, %r1 mfctl %cr30, %r1
LDREG TI_PRE_COUNT(%r1), %r19 LDREG TI_PRE_COUNT(%r1), %r19
CMPIB<> 0, %r19, intr_restore /* if preempt_count > 0 */ cmpib,COND(<>) 0, %r19, intr_restore /* if preempt_count > 0 */
nop /* prev insn branched backwards */ nop /* prev insn branched backwards */
/* check if we interrupted a critical path */ /* check if we interrupted a critical path */
...@@ -1064,7 +1057,7 @@ intr_do_preempt: ...@@ -1064,7 +1057,7 @@ intr_do_preempt:
*/ */
intr_extint: intr_extint:
CMPIB=,n 0,%r16,1f cmpib,COND(=),n 0,%r16,1f
get_stack_use_cr30 get_stack_use_cr30
b,n 2f b,n 2f
...@@ -1099,7 +1092,7 @@ ENDPROC(syscall_exit_rfi) ...@@ -1099,7 +1092,7 @@ ENDPROC(syscall_exit_rfi)
ENTRY(intr_save) /* for os_hpmc */ ENTRY(intr_save) /* for os_hpmc */
mfsp %sr7,%r16 mfsp %sr7,%r16
CMPIB=,n 0,%r16,1f cmpib,COND(=),n 0,%r16,1f
get_stack_use_cr30 get_stack_use_cr30
b 2f b 2f
copy %r8,%r26 copy %r8,%r26
...@@ -1121,7 +1114,7 @@ ENTRY(intr_save) /* for os_hpmc */ ...@@ -1121,7 +1114,7 @@ ENTRY(intr_save) /* for os_hpmc */
* adjust isr/ior below. * adjust isr/ior below.
*/ */
CMPIB=,n 6,%r26,skip_save_ior cmpib,COND(=),n 6,%r26,skip_save_ior
mfctl %cr20, %r16 /* isr */ mfctl %cr20, %r16 /* isr */
...@@ -1450,11 +1443,11 @@ nadtlb_emulate: ...@@ -1450,11 +1443,11 @@ nadtlb_emulate:
bb,>=,n %r9,26,nadtlb_nullify /* m bit not set, just nullify */ bb,>=,n %r9,26,nadtlb_nullify /* m bit not set, just nullify */
BL get_register,%r25 BL get_register,%r25
extrw,u %r9,15,5,%r8 /* Get index register # */ extrw,u %r9,15,5,%r8 /* Get index register # */
CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */
copy %r1,%r24 copy %r1,%r24
BL get_register,%r25 BL get_register,%r25
extrw,u %r9,10,5,%r8 /* Get base register # */ extrw,u %r9,10,5,%r8 /* Get base register # */
CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */
BL set_register,%r25 BL set_register,%r25
add,l %r1,%r24,%r1 /* doesn't affect c/b bits */ add,l %r1,%r24,%r1 /* doesn't affect c/b bits */
...@@ -1486,7 +1479,7 @@ nadtlb_probe_check: ...@@ -1486,7 +1479,7 @@ nadtlb_probe_check:
cmpb,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/ cmpb,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/
BL get_register,%r25 /* Find the target register */ BL get_register,%r25 /* Find the target register */
extrw,u %r9,31,5,%r8 /* Get target register */ extrw,u %r9,31,5,%r8 /* Get target register */
CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */
BL set_register,%r25 BL set_register,%r25
copy %r0,%r1 /* Write zero to target register */ copy %r0,%r1 /* Write zero to target register */
b nadtlb_nullify /* Nullify return insn */ b nadtlb_nullify /* Nullify return insn */
...@@ -1570,12 +1563,12 @@ dbit_trap_20w: ...@@ -1570,12 +1563,12 @@ dbit_trap_20w:
L3_ptep ptp,pte,t0,va,dbit_fault L3_ptep ptp,pte,t0,va,dbit_fault
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nolock_20w cmpib,COND(=),n 0,spc,dbit_nolock_20w
load32 PA(pa_dbit_lock),t0 load32 PA(pa_dbit_lock),t0
dbit_spin_20w: dbit_spin_20w:
LDCW 0(t0),t1 LDCW 0(t0),t1
cmpib,= 0,t1,dbit_spin_20w cmpib,COND(=) 0,t1,dbit_spin_20w
nop nop
dbit_nolock_20w: dbit_nolock_20w:
...@@ -1586,7 +1579,7 @@ dbit_nolock_20w: ...@@ -1586,7 +1579,7 @@ dbit_nolock_20w:
idtlbt pte,prot idtlbt pte,prot
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nounlock_20w cmpib,COND(=),n 0,spc,dbit_nounlock_20w
ldi 1,t1 ldi 1,t1
stw t1,0(t0) stw t1,0(t0)
...@@ -1606,7 +1599,7 @@ dbit_trap_11: ...@@ -1606,7 +1599,7 @@ dbit_trap_11:
L2_ptep ptp,pte,t0,va,dbit_fault L2_ptep ptp,pte,t0,va,dbit_fault
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nolock_11 cmpib,COND(=),n 0,spc,dbit_nolock_11
load32 PA(pa_dbit_lock),t0 load32 PA(pa_dbit_lock),t0
dbit_spin_11: dbit_spin_11:
...@@ -1628,7 +1621,7 @@ dbit_nolock_11: ...@@ -1628,7 +1621,7 @@ dbit_nolock_11:
mtsp t1, %sr1 /* Restore sr1 */ mtsp t1, %sr1 /* Restore sr1 */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nounlock_11 cmpib,COND(=),n 0,spc,dbit_nounlock_11
ldi 1,t1 ldi 1,t1
stw t1,0(t0) stw t1,0(t0)
...@@ -1646,7 +1639,7 @@ dbit_trap_20: ...@@ -1646,7 +1639,7 @@ dbit_trap_20:
L2_ptep ptp,pte,t0,va,dbit_fault L2_ptep ptp,pte,t0,va,dbit_fault
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nolock_20 cmpib,COND(=),n 0,spc,dbit_nolock_20
load32 PA(pa_dbit_lock),t0 load32 PA(pa_dbit_lock),t0
dbit_spin_20: dbit_spin_20:
...@@ -1665,7 +1658,7 @@ dbit_nolock_20: ...@@ -1665,7 +1658,7 @@ dbit_nolock_20:
idtlbt pte,prot idtlbt pte,prot
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
CMPIB=,n 0,spc,dbit_nounlock_20 cmpib,COND(=),n 0,spc,dbit_nounlock_20
ldi 1,t1 ldi 1,t1
stw t1,0(t0) stw t1,0(t0)
...@@ -1994,7 +1987,7 @@ ENTRY(syscall_exit) ...@@ -1994,7 +1987,7 @@ ENTRY(syscall_exit)
/* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */
ldo -PER_HPUX(%r19), %r19 ldo -PER_HPUX(%r19), %r19
CMPIB<>,n 0,%r19,1f cmpib,COND(<>),n 0,%r19,1f
/* Save other hpux returns if personality is PER_HPUX */ /* Save other hpux returns if personality is PER_HPUX */
STREG %r22,TASK_PT_GR22(%r1) STREG %r22,TASK_PT_GR22(%r1)
......
...@@ -32,7 +32,7 @@ ENTRY(boot_args) ...@@ -32,7 +32,7 @@ ENTRY(boot_args)
.word 0 /* arg3 */ .word 0 /* arg3 */
END(boot_args) END(boot_args)
.section .text.head __HEAD
.align 4 .align 4
.import init_thread_union,data .import init_thread_union,data
.import fault_vector_20,code /* IVA parisc 2.0 32 bit */ .import fault_vector_20,code /* IVA parisc 2.0 32 bit */
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <asm/pdc.h> #include <asm/pdc.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
/* /*
* stack for os_hpmc, the HPMC handler. * stack for os_hpmc, the HPMC handler.
...@@ -76,7 +77,7 @@ ENTRY(hpmc_pim_data) ...@@ -76,7 +77,7 @@ ENTRY(hpmc_pim_data)
.block HPMC_PIM_DATA_SIZE .block HPMC_PIM_DATA_SIZE
END(hpmc_pim_data) END(hpmc_pim_data)
.text __HEAD
.import intr_save, code .import intr_save, code
ENTRY(os_hpmc) ENTRY(os_hpmc)
......
...@@ -499,7 +499,7 @@ add_system_map_addresses(struct parisc_device *dev, int num_addrs, ...@@ -499,7 +499,7 @@ add_system_map_addresses(struct parisc_device *dev, int num_addrs,
dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL); dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL);
if(!dev->addr) { if(!dev->addr) {
printk(KERN_ERR "%s %s(): memory allocation failure\n", printk(KERN_ERR "%s %s(): memory allocation failure\n",
__FILE__, __FUNCTION__); __FILE__, __func__);
return; return;
} }
......
...@@ -37,8 +37,9 @@ ...@@ -37,8 +37,9 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
.text __HEAD
.align 128 .align 128
ENTRY(flush_tlb_all_local) ENTRY(flush_tlb_all_local)
...@@ -85,7 +86,7 @@ ENTRY(flush_tlb_all_local) ...@@ -85,7 +86,7 @@ ENTRY(flush_tlb_all_local)
LDREG ITLB_OFF_COUNT(%r1), %arg2 LDREG ITLB_OFF_COUNT(%r1), %arg2
LDREG ITLB_LOOP(%r1), %arg3 LDREG ITLB_LOOP(%r1), %arg3
ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ addib,COND(=) -1, %arg3, fitoneloop /* Preadjust and test */
movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */
copy %arg0, %r28 /* Init base addr */ copy %arg0, %r28 /* Init base addr */
...@@ -95,14 +96,14 @@ fitmanyloop: /* Loop if LOOP >= 2 */ ...@@ -95,14 +96,14 @@ fitmanyloop: /* Loop if LOOP >= 2 */
copy %arg2, %r29 /* Init middle loop count */ copy %arg2, %r29 /* Init middle loop count */
fitmanymiddle: /* Loop if LOOP >= 2 */ fitmanymiddle: /* Loop if LOOP >= 2 */
ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */
pitlbe 0(%sr1, %r28) pitlbe 0(%sr1, %r28)
pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */
ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */
copy %arg3, %r31 /* Re-init inner loop count */ copy %arg3, %r31 /* Re-init inner loop count */
movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */
ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ addib,COND(<=),n -1, %r22, fitdone /* Outer loop count decr */
fitoneloop: /* Loop if LOOP = 1 */ fitoneloop: /* Loop if LOOP = 1 */
mtsp %r20, %sr1 mtsp %r20, %sr1
...@@ -110,10 +111,10 @@ fitoneloop: /* Loop if LOOP = 1 */ ...@@ -110,10 +111,10 @@ fitoneloop: /* Loop if LOOP = 1 */
copy %arg2, %r29 /* init middle loop count */ copy %arg2, %r29 /* init middle loop count */
fitonemiddle: /* Loop if LOOP = 1 */ fitonemiddle: /* Loop if LOOP = 1 */
ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ addib,COND(>) -1, %r29, fitonemiddle /* Middle loop count decr */
pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */
ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ addib,COND(>) -1, %r22, fitoneloop /* Outer loop count decr */
add %r21, %r20, %r20 /* increment space */ add %r21, %r20, %r20 /* increment space */
fitdone: fitdone:
...@@ -128,7 +129,7 @@ fitdone: ...@@ -128,7 +129,7 @@ fitdone:
LDREG DTLB_OFF_COUNT(%r1), %arg2 LDREG DTLB_OFF_COUNT(%r1), %arg2
LDREG DTLB_LOOP(%r1), %arg3 LDREG DTLB_LOOP(%r1), %arg3
ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ addib,COND(=) -1, %arg3, fdtoneloop /* Preadjust and test */
movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */
copy %arg0, %r28 /* Init base addr */ copy %arg0, %r28 /* Init base addr */
...@@ -138,14 +139,14 @@ fdtmanyloop: /* Loop if LOOP >= 2 */ ...@@ -138,14 +139,14 @@ fdtmanyloop: /* Loop if LOOP >= 2 */
copy %arg2, %r29 /* Init middle loop count */ copy %arg2, %r29 /* Init middle loop count */
fdtmanymiddle: /* Loop if LOOP >= 2 */ fdtmanymiddle: /* Loop if LOOP >= 2 */
ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */
pdtlbe 0(%sr1, %r28) pdtlbe 0(%sr1, %r28)
pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */
ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */
copy %arg3, %r31 /* Re-init inner loop count */ copy %arg3, %r31 /* Re-init inner loop count */
movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */
ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ addib,COND(<=),n -1, %r22,fdtdone /* Outer loop count decr */
fdtoneloop: /* Loop if LOOP = 1 */ fdtoneloop: /* Loop if LOOP = 1 */
mtsp %r20, %sr1 mtsp %r20, %sr1
...@@ -153,10 +154,10 @@ fdtoneloop: /* Loop if LOOP = 1 */ ...@@ -153,10 +154,10 @@ fdtoneloop: /* Loop if LOOP = 1 */
copy %arg2, %r29 /* init middle loop count */ copy %arg2, %r29 /* init middle loop count */
fdtonemiddle: /* Loop if LOOP = 1 */ fdtonemiddle: /* Loop if LOOP = 1 */
ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ addib,COND(>) -1, %r29, fdtonemiddle /* Middle loop count decr */
pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */
ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ addib,COND(>) -1, %r22, fdtoneloop /* Outer loop count decr */
add %r21, %r20, %r20 /* increment space */ add %r21, %r20, %r20 /* increment space */
...@@ -209,18 +210,18 @@ ENTRY(flush_instruction_cache_local) ...@@ -209,18 +210,18 @@ ENTRY(flush_instruction_cache_local)
LDREG ICACHE_COUNT(%r1), %arg2 LDREG ICACHE_COUNT(%r1), %arg2
LDREG ICACHE_LOOP(%r1), %arg3 LDREG ICACHE_LOOP(%r1), %arg3
rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/
ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ addib,COND(=) -1, %arg3, fioneloop /* Preadjust and test */
movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */
fimanyloop: /* Loop if LOOP >= 2 */ fimanyloop: /* Loop if LOOP >= 2 */
ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ addib,COND(>) -1, %r31, fimanyloop /* Adjusted inner loop decr */
fice %r0(%sr1, %arg0) fice %r0(%sr1, %arg0)
fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */
movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */
ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ addib,COND(<=),n -1, %arg2, fisync /* Outer loop decr */
fioneloop: /* Loop if LOOP = 1 */ fioneloop: /* Loop if LOOP = 1 */
ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ addib,COND(>) -1, %arg2, fioneloop /* Outer loop count decr */
fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ fice,m %arg1(%sr1, %arg0) /* Fice for one loop */
fisync: fisync:
...@@ -250,18 +251,18 @@ ENTRY(flush_data_cache_local) ...@@ -250,18 +251,18 @@ ENTRY(flush_data_cache_local)
LDREG DCACHE_COUNT(%r1), %arg2 LDREG DCACHE_COUNT(%r1), %arg2
LDREG DCACHE_LOOP(%r1), %arg3 LDREG DCACHE_LOOP(%r1), %arg3
rsm PSW_SM_I, %r22 rsm PSW_SM_I, %r22
ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ addib,COND(=) -1, %arg3, fdoneloop /* Preadjust and test */
movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */
fdmanyloop: /* Loop if LOOP >= 2 */ fdmanyloop: /* Loop if LOOP >= 2 */
ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ addib,COND(>) -1, %r31, fdmanyloop /* Adjusted inner loop decr */
fdce %r0(%sr1, %arg0) fdce %r0(%sr1, %arg0)
fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */
movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */
ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ addib,COND(<=),n -1, %arg2, fdsync /* Outer loop decr */
fdoneloop: /* Loop if LOOP = 1 */ fdoneloop: /* Loop if LOOP = 1 */
ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ addib,COND(>) -1, %arg2, fdoneloop /* Outer loop count decr */
fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */
fdsync: fdsync:
...@@ -342,7 +343,7 @@ ENTRY(copy_user_page_asm) ...@@ -342,7 +343,7 @@ ENTRY(copy_user_page_asm)
* non-taken backward branch. Note that .+4 is a backwards branch. * non-taken backward branch. Note that .+4 is a backwards branch.
* The ldd should only get executed if the branch is taken. * The ldd should only get executed if the branch is taken.
*/ */
ADDIB>,n -1, %r1, 1b /* bundle 10 */ addib,COND(>),n -1, %r1, 1b /* bundle 10 */
ldd 0(%r25), %r19 /* start next loads */ ldd 0(%r25), %r19 /* start next loads */
#else #else
...@@ -391,7 +392,7 @@ ENTRY(copy_user_page_asm) ...@@ -391,7 +392,7 @@ ENTRY(copy_user_page_asm)
stw %r21, 56(%r26) stw %r21, 56(%r26)
stw %r22, 60(%r26) stw %r22, 60(%r26)
ldo 64(%r26), %r26 ldo 64(%r26), %r26
ADDIB>,n -1, %r1, 1b addib,COND(>),n -1, %r1, 1b
ldw 0(%r25), %r19 ldw 0(%r25), %r19
#endif #endif
bv %r0(%r2) bv %r0(%r2)
...@@ -515,7 +516,7 @@ ENTRY(copy_user_page_asm) ...@@ -515,7 +516,7 @@ ENTRY(copy_user_page_asm)
stw %r21, 56(%r28) stw %r21, 56(%r28)
stw %r22, 60(%r28) stw %r22, 60(%r28)
ldo 64(%r28), %r28 ldo 64(%r28), %r28
ADDIB> -1, %r1,1b addib,COND(>) -1, %r1,1b
ldo 64(%r29), %r29 ldo 64(%r29), %r29
bv %r0(%r2) bv %r0(%r2)
...@@ -574,7 +575,7 @@ ENTRY(__clear_user_page_asm) ...@@ -574,7 +575,7 @@ ENTRY(__clear_user_page_asm)
std %r0, 104(%r28) std %r0, 104(%r28)
std %r0, 112(%r28) std %r0, 112(%r28)
std %r0, 120(%r28) std %r0, 120(%r28)
ADDIB> -1, %r1, 1b addib,COND(>) -1, %r1, 1b
ldo 128(%r28), %r28 ldo 128(%r28), %r28
#else /* ! CONFIG_64BIT */ #else /* ! CONFIG_64BIT */
...@@ -597,7 +598,7 @@ ENTRY(__clear_user_page_asm) ...@@ -597,7 +598,7 @@ ENTRY(__clear_user_page_asm)
stw %r0, 52(%r28) stw %r0, 52(%r28)
stw %r0, 56(%r28) stw %r0, 56(%r28)
stw %r0, 60(%r28) stw %r0, 60(%r28)
ADDIB> -1, %r1, 1b addib,COND(>) -1, %r1, 1b
ldo 64(%r28), %r28 ldo 64(%r28), %r28
#endif /* CONFIG_64BIT */ #endif /* CONFIG_64BIT */
...@@ -640,7 +641,7 @@ ENTRY(flush_kernel_dcache_page_asm) ...@@ -640,7 +641,7 @@ ENTRY(flush_kernel_dcache_page_asm)
fdc,m %r23(%r26) fdc,m %r23(%r26)
fdc,m %r23(%r26) fdc,m %r23(%r26)
fdc,m %r23(%r26) fdc,m %r23(%r26)
CMPB<< %r26, %r25,1b cmpb,COND(<<) %r26, %r25,1b
fdc,m %r23(%r26) fdc,m %r23(%r26)
sync sync
...@@ -683,7 +684,7 @@ ENTRY(flush_user_dcache_page) ...@@ -683,7 +684,7 @@ ENTRY(flush_user_dcache_page)
fdc,m %r23(%sr3, %r26) fdc,m %r23(%sr3, %r26)
fdc,m %r23(%sr3, %r26) fdc,m %r23(%sr3, %r26)
fdc,m %r23(%sr3, %r26) fdc,m %r23(%sr3, %r26)
CMPB<< %r26, %r25,1b cmpb,COND(<<) %r26, %r25,1b
fdc,m %r23(%sr3, %r26) fdc,m %r23(%sr3, %r26)
sync sync
...@@ -726,7 +727,7 @@ ENTRY(flush_user_icache_page) ...@@ -726,7 +727,7 @@ ENTRY(flush_user_icache_page)
fic,m %r23(%sr3, %r26) fic,m %r23(%sr3, %r26)
fic,m %r23(%sr3, %r26) fic,m %r23(%sr3, %r26)
fic,m %r23(%sr3, %r26) fic,m %r23(%sr3, %r26)
CMPB<< %r26, %r25,1b cmpb,COND(<<) %r26, %r25,1b
fic,m %r23(%sr3, %r26) fic,m %r23(%sr3, %r26)
sync sync
...@@ -769,7 +770,7 @@ ENTRY(purge_kernel_dcache_page) ...@@ -769,7 +770,7 @@ ENTRY(purge_kernel_dcache_page)
pdc,m %r23(%r26) pdc,m %r23(%r26)
pdc,m %r23(%r26) pdc,m %r23(%r26)
pdc,m %r23(%r26) pdc,m %r23(%r26)
CMPB<< %r26, %r25, 1b cmpb,COND(<<) %r26, %r25, 1b
pdc,m %r23(%r26) pdc,m %r23(%r26)
sync sync
...@@ -833,7 +834,7 @@ ENTRY(flush_alias_page) ...@@ -833,7 +834,7 @@ ENTRY(flush_alias_page)
fdc,m %r23(%r28) fdc,m %r23(%r28)
fdc,m %r23(%r28) fdc,m %r23(%r28)
fdc,m %r23(%r28) fdc,m %r23(%r28)
CMPB<< %r28, %r29, 1b cmpb,COND(<<) %r28, %r29, 1b
fdc,m %r23(%r28) fdc,m %r23(%r28)
sync sync
...@@ -856,7 +857,7 @@ flush_user_dcache_range_asm: ...@@ -856,7 +857,7 @@ flush_user_dcache_range_asm:
ldo -1(%r23), %r21 ldo -1(%r23), %r21
ANDCM %r26, %r21, %r26 ANDCM %r26, %r21, %r26
1: CMPB<<,n %r26, %r25, 1b 1: cmpb,COND(<<),n %r26, %r25, 1b
fdc,m %r23(%sr3, %r26) fdc,m %r23(%sr3, %r26)
sync sync
...@@ -877,7 +878,7 @@ ENTRY(flush_kernel_dcache_range_asm) ...@@ -877,7 +878,7 @@ ENTRY(flush_kernel_dcache_range_asm)
ldo -1(%r23), %r21 ldo -1(%r23), %r21
ANDCM %r26, %r21, %r26 ANDCM %r26, %r21, %r26
1: CMPB<<,n %r26, %r25,1b 1: cmpb,COND(<<),n %r26, %r25,1b
fdc,m %r23(%r26) fdc,m %r23(%r26)
sync sync
...@@ -899,7 +900,7 @@ ENTRY(flush_user_icache_range_asm) ...@@ -899,7 +900,7 @@ ENTRY(flush_user_icache_range_asm)
ldo -1(%r23), %r21 ldo -1(%r23), %r21
ANDCM %r26, %r21, %r26 ANDCM %r26, %r21, %r26
1: CMPB<<,n %r26, %r25,1b 1: cmpb,COND(<<),n %r26, %r25,1b
fic,m %r23(%sr3, %r26) fic,m %r23(%sr3, %r26)
sync sync
...@@ -942,7 +943,7 @@ ENTRY(flush_kernel_icache_page) ...@@ -942,7 +943,7 @@ ENTRY(flush_kernel_icache_page)
fic,m %r23(%sr4, %r26) fic,m %r23(%sr4, %r26)
fic,m %r23(%sr4, %r26) fic,m %r23(%sr4, %r26)
fic,m %r23(%sr4, %r26) fic,m %r23(%sr4, %r26)
CMPB<< %r26, %r25, 1b cmpb,COND(<<) %r26, %r25, 1b
fic,m %r23(%sr4, %r26) fic,m %r23(%sr4, %r26)
sync sync
...@@ -963,7 +964,7 @@ ENTRY(flush_kernel_icache_range_asm) ...@@ -963,7 +964,7 @@ ENTRY(flush_kernel_icache_range_asm)
ldo -1(%r23), %r21 ldo -1(%r23), %r21
ANDCM %r26, %r21, %r26 ANDCM %r26, %r21, %r26
1: CMPB<<,n %r26, %r25, 1b 1: cmpb,COND(<<),n %r26, %r25, 1b
fic,m %r23(%sr4, %r26) fic,m %r23(%sr4, %r26)
sync sync
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
*/ */
#include <asm/assembly.h> #include <asm/assembly.h>
#include <linux/init.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
...@@ -41,7 +43,7 @@ ...@@ -41,7 +43,7 @@
; The coprocessor only needs to be enabled when ; The coprocessor only needs to be enabled when
; starting/stopping the coprocessor with the pmenb/pmdis. ; starting/stopping the coprocessor with the pmenb/pmdis.
; ;
.text __HEAD
ENTRY(perf_intrigue_enable_perf_counters) ENTRY(perf_intrigue_enable_perf_counters)
.proc .proc
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <asm/assembly.h> #include <asm/assembly.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
.section .bss .section .bss
.export real_stack .export real_stack
...@@ -39,7 +40,7 @@ save_cr_end: ...@@ -39,7 +40,7 @@ save_cr_end:
/************************ 32-bit real-mode calls ***********************/ /************************ 32-bit real-mode calls ***********************/
/* This can be called in both narrow and wide kernels */ /* This can be called in both narrow and wide kernels */
.text __HEAD
/* unsigned long real32_call_asm(unsigned int *sp, /* unsigned long real32_call_asm(unsigned int *sp,
* unsigned int *arg0p, * unsigned int *arg0p,
...@@ -113,7 +114,7 @@ ENDPROC(real32_call_asm) ...@@ -113,7 +114,7 @@ ENDPROC(real32_call_asm)
# define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where)
# define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r
.text __HEAD
save_control_regs: save_control_regs:
load32 PA(save_cr_space), %r28 load32 PA(save_cr_space), %r28
PUSH_CR(%cr24, %r28) PUSH_CR(%cr24, %r28)
...@@ -145,7 +146,7 @@ restore_control_regs: ...@@ -145,7 +146,7 @@ restore_control_regs:
/* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for
* more general-purpose use by the several places which need RFIs * more general-purpose use by the several places which need RFIs
*/ */
.text __HEAD
.align 128 .align 128
rfi_virt2real: rfi_virt2real:
/* switch to real mode... */ /* switch to real mode... */
...@@ -180,7 +181,7 @@ rfi_v2r_1: ...@@ -180,7 +181,7 @@ rfi_v2r_1:
bv 0(%r2) bv 0(%r2)
nop nop
.text __HEAD
.align 128 .align 128
rfi_real2virt: rfi_real2virt:
rsm PSW_SM_I,%r0 rsm PSW_SM_I,%r0
...@@ -218,7 +219,7 @@ rfi_r2v_1: ...@@ -218,7 +219,7 @@ rfi_r2v_1:
/************************ 64-bit real-mode calls ***********************/ /************************ 64-bit real-mode calls ***********************/
/* This is only usable in wide kernels right now and will probably stay so */ /* This is only usable in wide kernels right now and will probably stay so */
.text __HEAD
/* unsigned long real64_call_asm(unsigned long *sp, /* unsigned long real64_call_asm(unsigned long *sp,
* unsigned long *arg0p, * unsigned long *arg0p,
* unsigned long fn) * unsigned long fn)
...@@ -276,7 +277,7 @@ ENDPROC(real64_call_asm) ...@@ -276,7 +277,7 @@ ENDPROC(real64_call_asm)
#endif #endif
.text __HEAD
/* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html
** GCC 3.3 and later has a new function in libgcc.a for ** GCC 3.3 and later has a new function in libgcc.a for
** comparing function pointers. ** comparing function pointers.
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
/* We fill the empty parts of the gateway page with /* We fill the empty parts of the gateway page with
* something that will kill the kernel or a * something that will kill the kernel or a
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
.level LEVEL .level LEVEL
.text __HEAD
.import syscall_exit,code .import syscall_exit,code
.import syscall_exit_rfi,code .import syscall_exit_rfi,code
...@@ -636,7 +637,7 @@ END(sys_call_table64) ...@@ -636,7 +637,7 @@ END(sys_call_table64)
All light-weight-syscall atomic operations All light-weight-syscall atomic operations
will use this set of locks will use this set of locks
*/ */
.section .data .section .data, "aw"
.align PAGE_SIZE .align PAGE_SIZE
ENTRY(lws_lock_start) ENTRY(lws_lock_start)
/* lws locks */ /* lws locks */
......
...@@ -275,7 +275,7 @@ KERN_CRIT " || ||\n"); ...@@ -275,7 +275,7 @@ KERN_CRIT " || ||\n");
/* Wot's wrong wif bein' racy? */ /* Wot's wrong wif bein' racy? */
if (current->thread.flags & PARISC_KERNEL_DEATH) { if (current->thread.flags & PARISC_KERNEL_DEATH) {
printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__); printk(KERN_CRIT "%s() recursion detected.\n", __func__);
local_irq_enable(); local_irq_enable();
while (1); while (1);
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/* #define DEBUG_UNALIGNED 1 */ /* #define DEBUG_UNALIGNED 1 */
#ifdef DEBUG_UNALIGNED #ifdef DEBUG_UNALIGNED
#define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __func__ ); printk(KERN_DEBUG fmt, ##args ); } while (0)
#else #else
#define DPRINTF(fmt, args...) #define DPRINTF(fmt, args...)
#endif #endif
...@@ -460,7 +460,8 @@ void handle_unaligned(struct pt_regs *regs) ...@@ -460,7 +460,8 @@ void handle_unaligned(struct pt_regs *regs)
goto force_sigbus; goto force_sigbus;
} }
if (unaligned_count > 5 && jiffies - last_time > 5*HZ) { if (unaligned_count > 5 &&
time_after(jiffies, last_time + 5 * HZ)) {
unaligned_count = 0; unaligned_count = 0;
last_time = jiffies; last_time = jiffies;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <asm/assembly.h> #include <asm/assembly.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.macro get_fault_ip t1 t2 .macro get_fault_ip t1 t2
...@@ -55,7 +56,7 @@ ...@@ -55,7 +56,7 @@
.level LEVEL .level LEVEL
.text __HEAD
.section .fixup, "ax" .section .fixup, "ax"
/* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */
......
...@@ -33,11 +33,12 @@ ...@@ -33,11 +33,12 @@
*/ */
.text
#include <asm/assembly.h> #include <asm/assembly.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h>
__HEAD
/* /*
* get_sr gets the appropriate space value into * get_sr gets the appropriate space value into
......
...@@ -91,7 +91,7 @@ DECLARE_PER_CPU(struct exception_data, exception_data); ...@@ -91,7 +91,7 @@ DECLARE_PER_CPU(struct exception_data, exception_data);
#define THRESHOLD 16 #define THRESHOLD 16
#ifdef DEBUG_MEMCPY #ifdef DEBUG_MEMCPY
#define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __func__ ); printk(KERN_DEBUG fmt, ##args ); } while (0)
#else #else
#define DPRINTF(fmt, args...) #define DPRINTF(fmt, args...)
#endif #endif
......
...@@ -555,8 +555,6 @@ void show_mem(void) ...@@ -555,8 +555,6 @@ void show_mem(void)
printk(KERN_INFO "Mem-info:\n"); printk(KERN_INFO "Mem-info:\n");
show_free_areas(); show_free_areas();
printk(KERN_INFO "Free swap: %6ldkB\n",
nr_swap_pages<<(PAGE_SHIFT-10));
#ifndef CONFIG_DISCONTIGMEM #ifndef CONFIG_DISCONTIGMEM
i = max_mapnr; i = max_mapnr;
while (i-- > 0) { while (i-- > 0) {
......
...@@ -88,7 +88,7 @@ asp_init_chip(struct parisc_device *dev) ...@@ -88,7 +88,7 @@ asp_init_chip(struct parisc_device *dev)
ret = -EBUSY; ret = -EBUSY;
dev->irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ); dev->irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ);
if (dev->irq < 0) { if (dev->irq < 0) {
printk(KERN_ERR "%s(): cannot get GSC irq\n", __FUNCTION__); printk(KERN_ERR "%s(): cannot get GSC irq\n", __func__);
goto out; goto out;
} }
......
...@@ -359,7 +359,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ...@@ -359,7 +359,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE); BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE);
DBG_RES("%s() size: %d pages_needed %d\n", DBG_RES("%s() size: %d pages_needed %d\n",
__FUNCTION__, size, pages_needed); __func__, size, pages_needed);
/* /*
** "seek and ye shall find"...praying never hurts either... ** "seek and ye shall find"...praying never hurts either...
...@@ -395,16 +395,16 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ...@@ -395,16 +395,16 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
#endif #endif
} else { } else {
panic("%s: %s() Too many pages to map. pages_needed: %u\n", panic("%s: %s() Too many pages to map. pages_needed: %u\n",
__FILE__, __FUNCTION__, pages_needed); __FILE__, __func__, pages_needed);
} }
panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__, panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__,
__FUNCTION__); __func__);
resource_found: resource_found:
DBG_RES("%s() res_idx %d res_hint: %d\n", DBG_RES("%s() res_idx %d res_hint: %d\n",
__FUNCTION__, res_idx, ioc->res_hint); __func__, res_idx, ioc->res_hint);
#ifdef CCIO_SEARCH_TIME #ifdef CCIO_SEARCH_TIME
{ {
...@@ -450,7 +450,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped) ...@@ -450,7 +450,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
BUG_ON(pages_mapped > BITS_PER_LONG); BUG_ON(pages_mapped > BITS_PER_LONG);
DBG_RES("%s(): res_idx: %d pages_mapped %d\n", DBG_RES("%s(): res_idx: %d pages_mapped %d\n",
__FUNCTION__, res_idx, pages_mapped); __func__, res_idx, pages_mapped);
#ifdef CCIO_MAP_STATS #ifdef CCIO_MAP_STATS
ioc->used_pages -= pages_mapped; ioc->used_pages -= pages_mapped;
...@@ -474,7 +474,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped) ...@@ -474,7 +474,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
#endif #endif
} else { } else {
panic("%s:%s() Too many pages to unmap.\n", __FILE__, panic("%s:%s() Too many pages to unmap.\n", __FILE__,
__FUNCTION__); __func__);
} }
} }
...@@ -775,7 +775,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, ...@@ -775,7 +775,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size,
pdir_start = &(ioc->pdir_base[idx]); pdir_start = &(ioc->pdir_base[idx]);
DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n", DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n",
__FUNCTION__, addr, (long)iovp | offset, size); __func__, addr, (long)iovp | offset, size);
/* If not cacheline aligned, force SAFE_DMA on the whole mess */ /* If not cacheline aligned, force SAFE_DMA on the whole mess */
if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES)) if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
...@@ -820,7 +820,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, ...@@ -820,7 +820,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN("%s() iovp 0x%lx/%x\n", DBG_RUN("%s() iovp 0x%lx/%x\n",
__FUNCTION__, (long)iova, size); __func__, (long)iova, size);
iova ^= offset; /* clear offset bits */ iova ^= offset; /* clear offset bits */
size += offset; size += offset;
...@@ -922,7 +922,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -922,7 +922,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
BUG_ON(!dev); BUG_ON(!dev);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
/* Fast path single entry scatterlists. */ /* Fast path single entry scatterlists. */
if (nents == 1) { if (nents == 1) {
...@@ -966,7 +966,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -966,7 +966,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
BUG_ON(coalesced != filled); BUG_ON(coalesced != filled);
DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled);
for (i = 0; i < filled; i++) for (i = 0; i < filled; i++)
current_len += sg_dma_len(sglist + i); current_len += sg_dma_len(sglist + i);
...@@ -995,7 +995,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -995,7 +995,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
DBG_RUN_SG("%s() START %d entries, %08lx,%x\n", DBG_RUN_SG("%s() START %d entries, %08lx,%x\n",
__FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); __func__, nents, sg_virt_addr(sglist), sglist->length);
#ifdef CCIO_MAP_STATS #ifdef CCIO_MAP_STATS
ioc->usg_calls++; ioc->usg_calls++;
...@@ -1011,7 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1011,7 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
++sglist; ++sglist;
} }
DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
} }
static struct hppa_dma_ops ccio_ops = { static struct hppa_dma_ops ccio_ops = {
...@@ -1225,7 +1225,7 @@ static int ...@@ -1225,7 +1225,7 @@ static int
ccio_get_iotlb_size(struct parisc_device *dev) ccio_get_iotlb_size(struct parisc_device *dev)
{ {
if (dev->spa_shift == 0) { if (dev->spa_shift == 0) {
panic("%s() : Can't determine I/O TLB size.\n", __FUNCTION__); panic("%s() : Can't determine I/O TLB size.\n", __func__);
} }
return (1 << dev->spa_shift); return (1 << dev->spa_shift);
} }
...@@ -1315,7 +1315,7 @@ ccio_ioc_init(struct ioc *ioc) ...@@ -1315,7 +1315,7 @@ ccio_ioc_init(struct ioc *ioc)
BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT)); BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT));
DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n", DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
__FUNCTION__, ioc->ioc_regs, __func__, ioc->ioc_regs,
(unsigned long) num_physpages >> (20 - PAGE_SHIFT), (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
iova_space_size>>20, iova_space_size>>20,
iov_order + PAGE_SHIFT); iov_order + PAGE_SHIFT);
...@@ -1323,7 +1323,7 @@ ccio_ioc_init(struct ioc *ioc) ...@@ -1323,7 +1323,7 @@ ccio_ioc_init(struct ioc *ioc)
ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL,
get_order(ioc->pdir_size)); get_order(ioc->pdir_size));
if(NULL == ioc->pdir_base) { if(NULL == ioc->pdir_base) {
panic("%s() could not allocate I/O Page Table\n", __FUNCTION__); panic("%s() could not allocate I/O Page Table\n", __func__);
} }
memset(ioc->pdir_base, 0, ioc->pdir_size); memset(ioc->pdir_base, 0, ioc->pdir_size);
...@@ -1332,12 +1332,12 @@ ccio_ioc_init(struct ioc *ioc) ...@@ -1332,12 +1332,12 @@ ccio_ioc_init(struct ioc *ioc)
/* resource map size dictated by pdir_size */ /* resource map size dictated by pdir_size */
ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3;
DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size); DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size);
ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL,
get_order(ioc->res_size)); get_order(ioc->res_size));
if(NULL == ioc->res_map) { if(NULL == ioc->res_map) {
panic("%s() could not allocate resource map\n", __FUNCTION__); panic("%s() could not allocate resource map\n", __func__);
} }
memset(ioc->res_map, 0, ioc->res_size); memset(ioc->res_map, 0, ioc->res_size);
...@@ -1409,7 +1409,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) ...@@ -1409,7 +1409,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
result = insert_resource(&iomem_resource, res); result = insert_resource(&iomem_resource, res);
if (result < 0) { if (result < 0) {
printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n",
__FUNCTION__, res->start, res->end); __func__, res->start, res->end);
} }
} }
......
...@@ -180,7 +180,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, ...@@ -180,7 +180,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
void __iomem *base_addr = d->hba.base_addr; void __iomem *base_addr = d->hba.base_addr;
unsigned long flags; unsigned long flags;
DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where, DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where,
size); size);
spin_lock_irqsave(&d->dinosaur_pen, flags); spin_lock_irqsave(&d->dinosaur_pen, flags);
...@@ -215,7 +215,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, ...@@ -215,7 +215,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where,
void __iomem *base_addr = d->hba.base_addr; void __iomem *base_addr = d->hba.base_addr;
unsigned long flags; unsigned long flags;
DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where, DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where,
size); size);
spin_lock_irqsave(&d->dinosaur_pen, flags); spin_lock_irqsave(&d->dinosaur_pen, flags);
...@@ -301,7 +301,7 @@ static void dino_disable_irq(unsigned int irq) ...@@ -301,7 +301,7 @@ static void dino_disable_irq(unsigned int irq)
struct dino_device *dino_dev = irq_desc[irq].chip_data; struct dino_device *dino_dev = irq_desc[irq].chip_data;
int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
/* Clear the matching bit in the IMR register */ /* Clear the matching bit in the IMR register */
dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq));
...@@ -314,7 +314,7 @@ static void dino_enable_irq(unsigned int irq) ...@@ -314,7 +314,7 @@ static void dino_enable_irq(unsigned int irq)
int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
u32 tmp; u32 tmp;
DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
/* /*
** clear pending IRQ bits ** clear pending IRQ bits
...@@ -340,7 +340,7 @@ static void dino_enable_irq(unsigned int irq) ...@@ -340,7 +340,7 @@ static void dino_enable_irq(unsigned int irq)
tmp = __raw_readl(dino_dev->hba.base_addr+DINO_ILR); tmp = __raw_readl(dino_dev->hba.base_addr+DINO_ILR);
if (tmp & DINO_MASK_IRQ(local_irq)) { if (tmp & DINO_MASK_IRQ(local_irq)) {
DBG(KERN_WARNING "%s(): IRQ asserted! (ILR 0x%x)\n", DBG(KERN_WARNING "%s(): IRQ asserted! (ILR 0x%x)\n",
__FUNCTION__, tmp); __func__, tmp);
gsc_writel(dino_dev->txn_data, dino_dev->txn_addr); gsc_writel(dino_dev->txn_data, dino_dev->txn_addr);
} }
} }
...@@ -388,7 +388,7 @@ ilr_again: ...@@ -388,7 +388,7 @@ ilr_again:
int local_irq = __ffs(mask); int local_irq = __ffs(mask);
int irq = dino_dev->global_irq[local_irq]; int irq = dino_dev->global_irq[local_irq];
DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n", DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
__FUNCTION__, irq, intr_dev, mask); __func__, irq, intr_dev, mask);
__do_IRQ(irq); __do_IRQ(irq);
mask &= ~(1 << local_irq); mask &= ~(1 << local_irq);
} while (mask); } while (mask);
...@@ -566,7 +566,7 @@ dino_fixup_bus(struct pci_bus *bus) ...@@ -566,7 +566,7 @@ dino_fixup_bus(struct pci_bus *bus)
int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num); int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num);
DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n",
__FUNCTION__, bus, bus->secondary, __func__, bus, bus->secondary,
bus->bridge->platform_data); bus->bridge->platform_data);
/* Firmware doesn't set up card-mode dino, so we have to */ /* Firmware doesn't set up card-mode dino, so we have to */
......
...@@ -112,7 +112,7 @@ static void gsc_asic_disable_irq(unsigned int irq) ...@@ -112,7 +112,7 @@ static void gsc_asic_disable_irq(unsigned int irq)
int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
u32 imr; u32 imr;
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq, DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
irq_dev->name, imr); irq_dev->name, imr);
/* Disable the IRQ line by clearing the bit in the IMR */ /* Disable the IRQ line by clearing the bit in the IMR */
...@@ -127,7 +127,7 @@ static void gsc_asic_enable_irq(unsigned int irq) ...@@ -127,7 +127,7 @@ static void gsc_asic_enable_irq(unsigned int irq)
int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
u32 imr; u32 imr;
DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq, DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq,
irq_dev->name, imr); irq_dev->name, imr);
/* Enable the IRQ line by setting the bit in the IMR */ /* Enable the IRQ line by setting the bit in the IMR */
......
...@@ -193,7 +193,7 @@ lasi_init_chip(struct parisc_device *dev) ...@@ -193,7 +193,7 @@ lasi_init_chip(struct parisc_device *dev)
dev->irq = gsc_alloc_irq(&gsc_irq); dev->irq = gsc_alloc_irq(&gsc_irq);
if (dev->irq < 0) { if (dev->irq < 0) {
printk(KERN_ERR "%s(): cannot get GSC irq\n", printk(KERN_ERR "%s(): cannot get GSC irq\n",
__FUNCTION__); __func__);
kfree(lasi); kfree(lasi);
return -EBUSY; return -EBUSY;
} }
......
...@@ -377,12 +377,12 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int ...@@ -377,12 +377,12 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int
/* original - Generate config cycle on broken elroy /* original - Generate config cycle on broken elroy
with risk we will miss PCI bus errors. */ with risk we will miss PCI bus errors. */
*data = lba_rd_cfg(d, tok, pos, size); *data = lba_rd_cfg(d, tok, pos, size);
DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __FUNCTION__, tok, pos, *data); DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __func__, tok, pos, *data);
return 0; return 0;
} }
if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) {
DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __FUNCTION__, tok, pos); DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos);
/* either don't want to look or know device isn't present. */ /* either don't want to look or know device isn't present. */
*data = ~0U; *data = ~0U;
return(0); return(0);
...@@ -398,7 +398,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int ...@@ -398,7 +398,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int
case 2: *data = READ_REG16(data_reg + (pos & 2)); break; case 2: *data = READ_REG16(data_reg + (pos & 2)); break;
case 4: *data = READ_REG32(data_reg); break; case 4: *data = READ_REG32(data_reg); break;
} }
DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data); DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __func__, tok, pos, *data);
return 0; return 0;
} }
...@@ -441,16 +441,16 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int ...@@ -441,16 +441,16 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int
if (!LBA_SKIP_PROBE(d)) { if (!LBA_SKIP_PROBE(d)) {
/* Original Workaround */ /* Original Workaround */
lba_wr_cfg(d, tok, pos, (u32) data, size); lba_wr_cfg(d, tok, pos, (u32) data, size);
DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __FUNCTION__, tok, pos,data); DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __func__, tok, pos,data);
return 0; return 0;
} }
if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) { if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) {
DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __FUNCTION__, tok, pos,data); DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data);
return 1; /* New Workaround */ return 1; /* New Workaround */
} }
DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __FUNCTION__, tok, pos, data); DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __func__, tok, pos, data);
/* Basic Algorithm */ /* Basic Algorithm */
LBA_CFG_ADDR_SETUP(d, tok | pos); LBA_CFG_ADDR_SETUP(d, tok | pos);
...@@ -521,7 +521,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i ...@@ -521,7 +521,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i
if ((pos > 255) || (devfn > 255)) if ((pos > 255) || (devfn > 255))
return -EINVAL; return -EINVAL;
DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data); DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __func__, tok, pos, data);
LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); LBA_CFG_TR4_ADDR_SETUP(d, tok | pos);
switch(size) { switch(size) {
...@@ -890,7 +890,7 @@ LBA_PORT_IN(32, 0) ...@@ -890,7 +890,7 @@ LBA_PORT_IN(32, 0)
#define LBA_PORT_OUT(size, mask) \ #define LBA_PORT_OUT(size, mask) \
static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \ static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \
{ \ { \
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, d, addr, val); \
WRITE_REG##size(val, astro_iop_base + addr); \ WRITE_REG##size(val, astro_iop_base + addr); \
if (LBA_DEV(d)->hw_rev < 3) \ if (LBA_DEV(d)->hw_rev < 3) \
lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \ lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \
...@@ -932,7 +932,7 @@ static struct pci_port_ops lba_astro_port_ops = { ...@@ -932,7 +932,7 @@ static struct pci_port_ops lba_astro_port_ops = {
static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \ static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \
{ \ { \
u##size t; \ u##size t; \
DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \ DBG_PORT("%s(0x%p, 0x%x) ->", __func__, l, addr); \
t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \ t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \
DBG_PORT(" 0x%x\n", t); \ DBG_PORT(" 0x%x\n", t); \
return (t); \ return (t); \
...@@ -948,7 +948,7 @@ LBA_PORT_IN(32, 0) ...@@ -948,7 +948,7 @@ LBA_PORT_IN(32, 0)
static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \ static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \
{ \ { \
void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \ void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \
DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, l, addr, val); \
WRITE_REG##size(val, where); \ WRITE_REG##size(val, where); \
/* flush the I/O down to the elroy at least */ \ /* flush the I/O down to the elroy at least */ \
lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \ lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \
...@@ -1584,7 +1584,7 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask) ...@@ -1584,7 +1584,7 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask)
WARN_ON((ibase & 0x001fffff) != 0); WARN_ON((ibase & 0x001fffff) != 0);
WARN_ON((imask & 0x001fffff) != 0); WARN_ON((imask & 0x001fffff) != 0);
DBG("%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask); DBG("%s() ibase 0x%x imask 0x%x\n", __func__, ibase, imask);
WRITE_REG32( imask, base_addr + LBA_IMASK); WRITE_REG32( imask, base_addr + LBA_IMASK);
WRITE_REG32( ibase, base_addr + LBA_IBASE); WRITE_REG32( ibase, base_addr + LBA_IBASE);
iounmap(base_addr); iounmap(base_addr);
......
...@@ -569,7 +569,7 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d ...@@ -569,7 +569,7 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d
default: default:
printk(KERN_ERR "%s: Wrong LCD/LED model %d !\n", printk(KERN_ERR "%s: Wrong LCD/LED model %d !\n",
__FUNCTION__, lcd_info.model); __func__, lcd_info.model);
return 1; return 1;
} }
......
...@@ -384,7 +384,7 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev, ...@@ -384,7 +384,7 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev,
} }
mask = RESMAP_MASK(bits_wanted) >> bitshiftcnt; mask = RESMAP_MASK(bits_wanted) >> bitshiftcnt;
DBG_RES("%s() o %ld %p", __FUNCTION__, o, res_ptr); DBG_RES("%s() o %ld %p", __func__, o, res_ptr);
while(res_ptr < res_end) while(res_ptr < res_end)
{ {
DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr);
...@@ -454,7 +454,7 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ...@@ -454,7 +454,7 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
#endif #endif
DBG_RES("%s(%x) %d -> %lx hint %x/%x\n", DBG_RES("%s(%x) %d -> %lx hint %x/%x\n",
__FUNCTION__, size, pages_needed, pide, __func__, size, pages_needed, pide,
(uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map), (uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map),
ioc->res_bitshift ); ioc->res_bitshift );
...@@ -497,7 +497,7 @@ sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) ...@@ -497,7 +497,7 @@ sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size)
unsigned long m = RESMAP_MASK(bits_not_wanted) >> (pide & (BITS_PER_LONG - 1)); unsigned long m = RESMAP_MASK(bits_not_wanted) >> (pide & (BITS_PER_LONG - 1));
DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n", DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n",
__FUNCTION__, (uint) iova, size, __func__, (uint) iova, size,
bits_not_wanted, m, pide, res_ptr, *res_ptr); bits_not_wanted, m, pide, res_ptr, *res_ptr);
#ifdef SBA_COLLECT_STATS #ifdef SBA_COLLECT_STATS
...@@ -740,7 +740,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, ...@@ -740,7 +740,7 @@ sba_map_single(struct device *dev, void *addr, size_t size,
iovp = (dma_addr_t) pide << IOVP_SHIFT; iovp = (dma_addr_t) pide << IOVP_SHIFT;
DBG_RUN("%s() 0x%p -> 0x%lx\n", DBG_RUN("%s() 0x%p -> 0x%lx\n",
__FUNCTION__, addr, (long) iovp | offset); __func__, addr, (long) iovp | offset);
pdir_start = &(ioc->pdir_base[pide]); pdir_start = &(ioc->pdir_base[pide]);
...@@ -798,7 +798,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, ...@@ -798,7 +798,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
unsigned long flags; unsigned long flags;
dma_addr_t offset; dma_addr_t offset;
DBG_RUN("%s() iovp 0x%lx/%x\n", __FUNCTION__, (long) iova, size); DBG_RUN("%s() iovp 0x%lx/%x\n", __func__, (long) iova, size);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
offset = iova & ~IOVP_MASK; offset = iova & ~IOVP_MASK;
...@@ -937,7 +937,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -937,7 +937,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
int coalesced, filled = 0; int coalesced, filled = 0;
unsigned long flags; unsigned long flags;
DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); DBG_RUN_SG("%s() START %d entries\n", __func__, nents);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
...@@ -998,7 +998,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -998,7 +998,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents,
spin_unlock_irqrestore(&ioc->res_lock, flags); spin_unlock_irqrestore(&ioc->res_lock, flags);
DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled);
return filled; return filled;
} }
...@@ -1023,7 +1023,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1023,7 +1023,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
#endif #endif
DBG_RUN_SG("%s() START %d entries, %p,%x\n", DBG_RUN_SG("%s() START %d entries, %p,%x\n",
__FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); __func__, nents, sg_virt_addr(sglist), sglist->length);
ioc = GET_IOC(dev); ioc = GET_IOC(dev);
...@@ -1047,7 +1047,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ...@@ -1047,7 +1047,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,
++sglist; ++sglist;
} }
DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents);
#ifdef ASSERT_PDIR_SANITY #ifdef ASSERT_PDIR_SANITY
spin_lock_irqsave(&ioc->res_lock, flags); spin_lock_irqsave(&ioc->res_lock, flags);
...@@ -1118,7 +1118,7 @@ sba_alloc_pdir(unsigned int pdir_size) ...@@ -1118,7 +1118,7 @@ sba_alloc_pdir(unsigned int pdir_size)
pdir_base = __get_free_pages(GFP_KERNEL, pdir_order); pdir_base = __get_free_pages(GFP_KERNEL, pdir_order);
if (NULL == (void *) pdir_base) { if (NULL == (void *) pdir_base) {
panic("%s() could not allocate I/O Page Table\n", panic("%s() could not allocate I/O Page Table\n",
__FUNCTION__); __func__);
} }
/* If this is not PA8700 (PCX-W2) /* If this is not PA8700 (PCX-W2)
...@@ -1261,7 +1261,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1261,7 +1261,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64);
DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n", DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n",
__FUNCTION__, ioc->ioc_hpa, iova_space_size >> 20, __func__, ioc->ioc_hpa, iova_space_size >> 20,
iov_order + PAGE_SHIFT); iov_order + PAGE_SHIFT);
ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL, ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL,
...@@ -1272,7 +1272,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1272,7 +1272,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
memset(ioc->pdir_base, 0, ioc->pdir_size); memset(ioc->pdir_base, 0, ioc->pdir_size);
DBG_INIT("%s() pdir %p size %x\n", DBG_INIT("%s() pdir %p size %x\n",
__FUNCTION__, ioc->pdir_base, ioc->pdir_size); __func__, ioc->pdir_base, ioc->pdir_size);
#ifdef SBA_HINT_SUPPORT #ifdef SBA_HINT_SUPPORT
ioc->hint_shift_pdir = iov_order + PAGE_SHIFT; ioc->hint_shift_pdir = iov_order + PAGE_SHIFT;
...@@ -1354,7 +1354,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1354,7 +1354,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
if (agp_found && sba_reserve_agpgart) { if (agp_found && sba_reserve_agpgart) {
printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n", printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n",
__FUNCTION__, (iova_space_size/2) >> 20); __func__, (iova_space_size/2) >> 20);
ioc->pdir_size /= 2; ioc->pdir_size /= 2;
ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE; ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE;
} }
...@@ -1406,7 +1406,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1406,7 +1406,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64);
DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n", DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n",
__FUNCTION__, __func__,
ioc->ioc_hpa, ioc->ioc_hpa,
(unsigned long) num_physpages >> (20 - PAGE_SHIFT), (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
iova_space_size>>20, iova_space_size>>20,
...@@ -1415,7 +1415,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1415,7 +1415,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
ioc->pdir_base = sba_alloc_pdir(pdir_size); ioc->pdir_base = sba_alloc_pdir(pdir_size);
DBG_INIT("%s() pdir %p size %x\n", DBG_INIT("%s() pdir %p size %x\n",
__FUNCTION__, ioc->pdir_base, pdir_size); __func__, ioc->pdir_base, pdir_size);
#ifdef SBA_HINT_SUPPORT #ifdef SBA_HINT_SUPPORT
/* FIXME : DMA HINTs not used */ /* FIXME : DMA HINTs not used */
...@@ -1443,7 +1443,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1443,7 +1443,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
#endif #endif
DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n", DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n",
__FUNCTION__, ioc->ibase, ioc->imask); __func__, ioc->ibase, ioc->imask);
/* /*
** FIXME: Hint registers are programmed with default hint ** FIXME: Hint registers are programmed with default hint
...@@ -1470,7 +1470,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ...@@ -1470,7 +1470,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num)
ioc->ibase = 0; /* used by SBA_IOVA and related macros */ ioc->ibase = 0; /* used by SBA_IOVA and related macros */
DBG_INIT("%s() DONE\n", __FUNCTION__); DBG_INIT("%s() DONE\n", __func__);
} }
...@@ -1544,7 +1544,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, ...@@ -1544,7 +1544,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
if (!IS_PLUTO(sba_dev->dev)) { if (!IS_PLUTO(sba_dev->dev)) {
ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL); ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL);
DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->", DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->",
__FUNCTION__, sba_dev->sba_hpa, ioc_ctl); __func__, sba_dev->sba_hpa, ioc_ctl);
ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE); ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE);
ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC; ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC;
/* j6700 v1.6 firmware sets 0x294f */ /* j6700 v1.6 firmware sets 0x294f */
...@@ -1675,7 +1675,7 @@ sba_common_init(struct sba_device *sba_dev) ...@@ -1675,7 +1675,7 @@ sba_common_init(struct sba_device *sba_dev)
res_size >>= 3; /* convert bit count to byte count */ res_size >>= 3; /* convert bit count to byte count */
DBG_INIT("%s() res_size 0x%x\n", DBG_INIT("%s() res_size 0x%x\n",
__FUNCTION__, res_size); __func__, res_size);
sba_dev->ioc[i].res_size = res_size; sba_dev->ioc[i].res_size = res_size;
sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size)); sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size));
...@@ -1688,7 +1688,7 @@ sba_common_init(struct sba_device *sba_dev) ...@@ -1688,7 +1688,7 @@ sba_common_init(struct sba_device *sba_dev)
if (NULL == sba_dev->ioc[i].res_map) if (NULL == sba_dev->ioc[i].res_map)
{ {
panic("%s:%s() could not allocate resource map\n", panic("%s:%s() could not allocate resource map\n",
__FILE__, __FUNCTION__ ); __FILE__, __func__ );
} }
memset(sba_dev->ioc[i].res_map, 0, res_size); memset(sba_dev->ioc[i].res_map, 0, res_size);
...@@ -1725,7 +1725,7 @@ sba_common_init(struct sba_device *sba_dev) ...@@ -1725,7 +1725,7 @@ sba_common_init(struct sba_device *sba_dev)
#endif #endif
DBG_INIT("%s() %d res_map %x %p\n", DBG_INIT("%s() %d res_map %x %p\n",
__FUNCTION__, i, res_size, sba_dev->ioc[i].res_map); __func__, i, res_size, sba_dev->ioc[i].res_map);
} }
spin_lock_init(&sba_dev->sba_lock); spin_lock_init(&sba_dev->sba_lock);
......
...@@ -93,7 +93,7 @@ wax_init_chip(struct parisc_device *dev) ...@@ -93,7 +93,7 @@ wax_init_chip(struct parisc_device *dev)
dev->irq = gsc_claim_irq(&gsc_irq, WAX_GSC_IRQ); dev->irq = gsc_claim_irq(&gsc_irq, WAX_GSC_IRQ);
if (dev->irq < 0) { if (dev->irq < 0) {
printk(KERN_ERR "%s(): cannot get GSC irq\n", printk(KERN_ERR "%s(): cannot get GSC irq\n",
__FUNCTION__); __func__);
kfree(wax); kfree(wax);
return -EBUSY; return -EBUSY;
} }
......
...@@ -31,9 +31,8 @@ ...@@ -31,9 +31,8 @@
#define STREGM std,ma #define STREGM std,ma
#define SHRREG shrd #define SHRREG shrd
#define SHLREG shld #define SHLREG shld
#define ADDIB addib,*
#define CMPB cmpb,*
#define ANDCM andcm,* #define ANDCM andcm,*
#define COND(x) * ## x
#define RP_OFFSET 16 #define RP_OFFSET 16
#define FRAME_SIZE 128 #define FRAME_SIZE 128
#define CALLEE_REG_FRAME_SIZE 144 #define CALLEE_REG_FRAME_SIZE 144
...@@ -46,9 +45,8 @@ ...@@ -46,9 +45,8 @@
#define STREGM stwm #define STREGM stwm
#define SHRREG shr #define SHRREG shr
#define SHLREG shlw #define SHLREG shlw
#define ADDIB addib,
#define CMPB cmpb,
#define ANDCM andcm #define ANDCM andcm
#define COND(x) x
#define RP_OFFSET 20 #define RP_OFFSET 20
#define FRAME_SIZE 64 #define FRAME_SIZE 64
#define CALLEE_REG_FRAME_SIZE 128 #define CALLEE_REG_FRAME_SIZE 128
......
...@@ -32,21 +32,6 @@ ...@@ -32,21 +32,6 @@
* NOTE: This limits the max parameter size to 16kB -1 ! * NOTE: This limits the max parameter size to 16kB -1 !
*/ */
#define _IOC_NRBITS 8
#define _IOC_TYPEBITS 8
#define _IOC_SIZEBITS 14
#define _IOC_DIRBITS 2
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
#define _IOC_NRSHIFT 0
#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
/* /*
* Direction bits. * Direction bits.
*/ */
...@@ -54,40 +39,6 @@ ...@@ -54,40 +39,6 @@
#define _IOC_WRITE 2U #define _IOC_WRITE 2U
#define _IOC_READ 1U #define _IOC_READ 1U
#define _IOC(dir,type,nr,size) \ #include <asm-generic/ioctl.h>
(((dir) << _IOC_DIRSHIFT) | \
((type) << _IOC_TYPESHIFT) | \
((nr) << _IOC_NRSHIFT) | \
((size) << _IOC_SIZESHIFT))
/* provoke compile error for invalid uses of size argument */
extern unsigned int __invalid_size_argument_for_IOC;
#define _IOC_TYPECHECK(t) \
((sizeof(t) == sizeof(t[1]) && \
sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
sizeof(t) : __invalid_size_argument_for_IOC)
/* used to create numbers */
#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
/* used to decode ioctl numbers.. */
#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
/* ...and for the drivers/sound files... */
#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
#endif /* _ASM_PARISC_IOCTL_H */ #endif /* _ASM_PARISC_IOCTL_H */
...@@ -46,6 +46,10 @@ ...@@ -46,6 +46,10 @@
#define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCSBRK 0x5427 /* BSD compatibility */
#define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */
#define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */
#define TCGETS2 _IOR('T',0x2A, struct termios2)
#define TCSETS2 _IOW('T',0x2B, struct termios2)
#define TCSETSW2 _IOW('T',0x2C, struct termios2)
#define TCSETSF2 _IOW('T',0x2D, struct termios2)
#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
......
...@@ -141,6 +141,7 @@ struct ktermios { ...@@ -141,6 +141,7 @@ struct ktermios {
#define HUPCL 0002000 #define HUPCL 0002000
#define CLOCAL 0004000 #define CLOCAL 0004000
#define CBAUDEX 0010000 #define CBAUDEX 0010000
#define BOTHER 0010000
#define B57600 0010001 #define B57600 0010001
#define B115200 0010002 #define B115200 0010002
#define B230400 0010003 #define B230400 0010003
...@@ -156,10 +157,12 @@ struct ktermios { ...@@ -156,10 +157,12 @@ struct ktermios {
#define B3000000 0010015 #define B3000000 0010015
#define B3500000 0010016 #define B3500000 0010016
#define B4000000 0010017 #define B4000000 0010017
#define CIBAUD 002003600000 /* input baud rate (not used) */ #define CIBAUD 002003600000 /* input baud rate */
#define CMSPAR 010000000000 /* mark or space (stick) parity */ #define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */ #define CRTSCTS 020000000000 /* flow control */
#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
/* c_lflag bits */ /* c_lflag bits */
#define ISIG 0000001 #define ISIG 0000001
......
...@@ -80,8 +80,10 @@ struct termio { ...@@ -80,8 +80,10 @@ struct termio {
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
}) })
#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
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