From 6035a85ed6582e469cccc788f18c99b5dc0cc7d8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 7 May 2008 09:09:39 +0200 Subject: [PATCH] --- yaml --- r: 96156 b: refs/heads/master c: bf0f97025c7306870b86ccd63669aa278e7ec1c2 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/s390/CommonIO | 11 + trunk/MAINTAINERS | 6 +- trunk/arch/cris/kernel/sys_cris.c | 5 +- trunk/arch/m32r/kernel/sys_m32r.c | 5 +- trunk/arch/s390/Kconfig | 7 - trunk/arch/s390/kernel/compat_wrapper.S | 2 +- trunk/arch/s390/kernel/entry.S | 29 +- trunk/arch/s390/kernel/entry64.S | 57 +--- trunk/arch/s390/kernel/ptrace.c | 100 +++++- trunk/arch/s390/kvm/Kconfig | 1 + trunk/arch/s390/kvm/intercept.c | 3 - trunk/arch/s390/kvm/kvm-s390.c | 5 +- trunk/arch/s390/mm/Makefile | 1 - trunk/arch/s390/mm/init.c | 3 - trunk/arch/s390/mm/page-states.c | 79 ----- trunk/arch/sparc/kernel/process.c | 20 +- trunk/arch/sparc/kernel/sys_sparc.c | 3 +- trunk/arch/sparc64/kernel/process.c | 18 +- trunk/arch/sparc64/kernel/smp.c | 27 +- trunk/arch/sparc64/kernel/sys_sparc.c | 4 +- trunk/arch/sparc64/kernel/sys_sparc32.c | 31 ++ trunk/arch/sparc64/kernel/systbls.S | 2 +- trunk/arch/sparc64/mm/init.c | 16 +- trunk/arch/um/drivers/line.c | 4 +- trunk/arch/um/include/line.h | 2 +- trunk/block/blk-sysfs.c | 6 +- trunk/drivers/accessibility/Kconfig | 12 +- trunk/drivers/char/sx.c | 9 +- trunk/drivers/char/vt.c | 6 - trunk/drivers/md/raid10.c | 2 +- trunk/drivers/media/video/cx18/cx18-driver.c | 2 +- .../media/video/saa7134/saa7134-video.c | 2 +- trunk/drivers/net/usb/asix.c | 4 - trunk/drivers/rtc/rtc-ds1511.c | 4 +- trunk/drivers/s390/char/tty3270.c | 15 +- trunk/drivers/s390/cio/blacklist.c | 323 +++++++++--------- trunk/drivers/s390/cio/cio.c | 39 ++- trunk/drivers/s390/cio/cio.h | 2 + trunk/drivers/s390/cio/cio_debug.h | 6 + trunk/drivers/s390/cio/css.c | 4 +- trunk/drivers/s390/cio/device.c | 25 +- trunk/drivers/s390/cio/device_fsm.c | 44 +-- trunk/drivers/s390/cio/device_id.c | 4 +- trunk/drivers/s390/cio/device_pgid.c | 12 +- trunk/drivers/s390/s390mach.c | 3 +- trunk/drivers/sbus/char/bpp.c | 2 +- trunk/drivers/scsi/dpt_i2o.c | 78 +++-- trunk/drivers/scsi/dpti.h | 13 + trunk/drivers/serial/serial_core.c | 3 +- trunk/drivers/usb/host/Kconfig | 2 +- trunk/drivers/usb/serial/iuu_phoenix.c | 6 +- trunk/drivers/video/bw2.c | 2 +- trunk/drivers/video/cg3.c | 2 +- trunk/drivers/video/cg6.c | 2 +- trunk/drivers/video/ffb.c | 2 +- trunk/drivers/video/leo.c | 2 +- trunk/drivers/video/p9100.c | 2 +- trunk/drivers/video/tcx.c | 20 +- trunk/fs/pipe.c | 6 +- trunk/fs/udf/namei.c | 145 +------- trunk/fs/udf/partition.c | 4 +- trunk/fs/udf/super.c | 1 - trunk/fs/udf/udfdecl.h | 1 - trunk/include/asm-s390/kvm_host.h | 1 - trunk/include/asm-s390/page.h | 11 - trunk/include/asm-s390/ptrace.h | 2 - trunk/include/asm-s390/system.h | 6 - trunk/include/linux/exportfs.h | 21 -- trunk/kernel/cpuset.c | 52 +-- trunk/mm/slub.c | 2 +- trunk/net/mac80211/rc80211_pid_debugfs.c | 4 +- trunk/sound/oss/kahlua.c | 2 +- 73 files changed, 591 insertions(+), 770 deletions(-) delete mode 100644 trunk/arch/s390/mm/page-states.c diff --git a/[refs] b/[refs] index 4a6b8f08c7d3..04758d3453e9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f1bce41fed02e45f31c2409f29e69e1fedebcdc +refs/heads/master: bf0f97025c7306870b86ccd63669aa278e7ec1c2 diff --git a/trunk/Documentation/s390/CommonIO b/trunk/Documentation/s390/CommonIO index bf0baa19ec24..8fbc0a852870 100644 --- a/trunk/Documentation/s390/CommonIO +++ b/trunk/Documentation/s390/CommonIO @@ -8,6 +8,17 @@ Command line parameters Enable logging of debug information in case of ccw device timeouts. + +* cio_msg = yes | no + + Determines whether information on found devices and sensed device + characteristics should be shown during startup or when new devices are + found, i. e. messages of the types "Detected device 0.0.4711 on subchannel + 0.0.0042" and "SenseID: Device 0.0.4711 reports: ...". + + Default is off. + + * cio_ignore = {all} | { | } | {! | !} diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index f5583dc7ea39..abe27871ad6a 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2112,10 +2112,12 @@ L: netdev@vger.kernel.org S: Maintained INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe) -P: Jeff Kirsher -M: jeffrey.t.kirsher@intel.com +P: Auke Kok +M: auke-jan.h.kok@intel.com P: Jesse Brandeburg M: jesse.brandeburg@intel.com +P: Jeff Kirsher +M: jeffrey.t.kirsher@intel.com P: Bruce Allan M: bruce.w.allan@intel.com P: John Ronciak diff --git a/trunk/arch/cris/kernel/sys_cris.c b/trunk/arch/cris/kernel/sys_cris.c index d124066e1728..8b9984197edc 100644 --- a/trunk/arch/cris/kernel/sys_cris.c +++ b/trunk/arch/cris/kernel/sys_cris.c @@ -40,11 +40,8 @@ asmlinkage int sys_pipe(unsigned long __user * fildes) error = do_pipe(fd); unlock_kernel(); if (!error) { - if (copy_to_user(fildes, fd, 2*sizeof(int))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user(fildes, fd, 2*sizeof(int))) error = -EFAULT; - } } return error; } diff --git a/trunk/arch/m32r/kernel/sys_m32r.c b/trunk/arch/m32r/kernel/sys_m32r.c index 319c79720b8a..6d7a80fdad48 100644 --- a/trunk/arch/m32r/kernel/sys_m32r.c +++ b/trunk/arch/m32r/kernel/sys_m32r.c @@ -90,11 +90,8 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2, error = do_pipe(fd); if (!error) { - if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) error = -EFAULT; - } } return error; } diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig index 1d035082e78e..29a7940f284f 100644 --- a/trunk/arch/s390/Kconfig +++ b/trunk/arch/s390/Kconfig @@ -430,13 +430,6 @@ config CMM_IUCV Select this option to enable the special message interface to the cooperative memory management. -config PAGE_STATES - bool "Unused page notification" - help - This enables the notification of unused pages to the - hypervisor. The ESSA instruction is used to do the states - changes between a page that has content and the unused state. - config VIRT_TIMER bool "Virtual CPU timer support" help diff --git a/trunk/arch/s390/kernel/compat_wrapper.S b/trunk/arch/s390/kernel/compat_wrapper.S index d003a6e16afb..743d54f0b8db 100644 --- a/trunk/arch/s390/kernel/compat_wrapper.S +++ b/trunk/arch/s390/kernel/compat_wrapper.S @@ -121,7 +121,7 @@ sys32_ptrace_wrapper: lgfr %r3,%r3 # long llgtr %r4,%r4 # long llgfr %r5,%r5 # long - jg compat_sys_ptrace # branch to system call + jg sys_ptrace # branch to system call .globl sys32_alarm_wrapper sys32_alarm_wrapper: diff --git a/trunk/arch/s390/kernel/entry.S b/trunk/arch/s390/kernel/entry.S index 708cf9cf9a35..bdbb3bcd78a5 100644 --- a/trunk/arch/s390/kernel/entry.S +++ b/trunk/arch/s390/kernel/entry.S @@ -279,6 +279,8 @@ sysc_do_restart: st %r2,SP_R2(%r15) # store return value (change R2 on stack) sysc_return: + tm SP_PSW+1(%r15),0x01 # returning to user ? + bno BASED(sysc_restore) tm __TI_flags+3(%r9),_TIF_WORK_SVC bnz BASED(sysc_work) # there is work to do (signals etc.) sysc_restore: @@ -310,8 +312,6 @@ sysc_work_loop: # One of the work bits is on. Find out which one. # sysc_work: - tm SP_PSW+1(%r15),0x01 # returning to user ? - bno BASED(sysc_restore) tm __TI_flags+3(%r9),_TIF_MCCK_PENDING bo BASED(sysc_mcck_pending) tm __TI_flags+3(%r9),_TIF_NEED_RESCHED @@ -602,6 +602,12 @@ io_no_vtime: la %r2,SP_PTREGS(%r15) # address of register-save area basr %r14,%r1 # branch to standard irq handler io_return: + tm SP_PSW+1(%r15),0x01 # returning to user ? +#ifdef CONFIG_PREEMPT + bno BASED(io_preempt) # no -> check for preemptive scheduling +#else + bno BASED(io_restore) # no-> skip resched & signal +#endif tm __TI_flags+3(%r9),_TIF_WORK_INT bnz BASED(io_work) # there is work to do (signals etc.) io_restore: @@ -623,18 +629,10 @@ io_restore_trace_psw: .long 0, io_restore_trace + 0x80000000 #endif -# -# switch to kernel stack, then check the TIF bits -# -io_work: - tm SP_PSW+1(%r15),0x01 # returning to user ? -#ifndef CONFIG_PREEMPT - bno BASED(io_restore) # no-> skip resched & signal -#else - bnz BASED(io_work_user) # no -> check for preemptive scheduling - # check for preemptive scheduling +#ifdef CONFIG_PREEMPT +io_preempt: icm %r0,15,__TI_precount(%r9) - bnz BASED(io_restore) # preemption disabled + bnz BASED(io_restore) l %r1,SP_R15(%r15) s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) @@ -648,7 +646,10 @@ io_resume_loop: br %r1 # call schedule #endif -io_work_user: +# +# switch to kernel stack, then check the TIF bits +# +io_work: l %r1,__LC_KERNEL_STACK s %r1,BASED(.Lc_spsize) mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) diff --git a/trunk/arch/s390/kernel/entry64.S b/trunk/arch/s390/kernel/entry64.S index fee10177dbfc..5a4a7bcd2bba 100644 --- a/trunk/arch/s390/kernel/entry64.S +++ b/trunk/arch/s390/kernel/entry64.S @@ -271,6 +271,8 @@ sysc_noemu: stg %r2,SP_R2(%r15) # store return value (change R2 on stack) sysc_return: + tm SP_PSW+1(%r15),0x01 # returning to user ? + jno sysc_restore tm __TI_flags+7(%r9),_TIF_WORK_SVC jnz sysc_work # there is work to do (signals etc.) sysc_restore: @@ -302,8 +304,6 @@ sysc_work_loop: # One of the work bits is on. Find out which one. # sysc_work: - tm SP_PSW+1(%r15),0x01 # returning to user ? - jno sysc_restore tm __TI_flags+7(%r9),_TIF_MCCK_PENDING jo sysc_mcck_pending tm __TI_flags+7(%r9),_TIF_NEED_RESCHED @@ -585,6 +585,12 @@ io_no_vtime: la %r2,SP_PTREGS(%r15) # address of register-save area brasl %r14,do_IRQ # call standard irq handler io_return: + tm SP_PSW+1(%r15),0x01 # returning to user ? +#ifdef CONFIG_PREEMPT + jno io_preempt # no -> check for preemptive scheduling +#else + jno io_restore # no-> skip resched & signal +#endif tm __TI_flags+7(%r9),_TIF_WORK_INT jnz io_work # there is work to do (signals etc.) io_restore: @@ -606,41 +612,10 @@ io_restore_trace_psw: .quad 0, io_restore_trace #endif -# -# There is work todo, we need to check if we return to userspace, then -# check, if we are in SIE, if yes leave it -# -io_work: - tm SP_PSW+1(%r15),0x01 # returning to user ? -#ifndef CONFIG_PREEMPT -#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) - jnz io_work_user # yes -> no need to check for SIE - la %r1, BASED(sie_opcode) # we return to kernel here - lg %r2, SP_PSW+8(%r15) - clc 0(2,%r1), 0(%r2) # is current instruction = SIE? - jne io_restore # no-> return to kernel - lg %r1, SP_PSW+8(%r15) # yes-> add 4 bytes to leave SIE - aghi %r1, 4 - stg %r1, SP_PSW+8(%r15) - j io_restore # return to kernel -#else - jno io_restore # no-> skip resched & signal -#endif -#else - jnz io_work_user # yes -> do resched & signal -#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) - la %r1, BASED(sie_opcode) - lg %r2, SP_PSW+8(%r15) - clc 0(2,%r1), 0(%r2) # is current instruction = SIE? - jne 0f # no -> leave PSW alone - lg %r1, SP_PSW+8(%r15) # yes-> add 4 bytes to leave SIE - aghi %r1, 4 - stg %r1, SP_PSW+8(%r15) -0: -#endif - # check for preemptive scheduling +#ifdef CONFIG_PREEMPT +io_preempt: icm %r0,15,__TI_precount(%r9) - jnz io_restore # preemption is disabled + jnz io_restore # switch to kernel stack lg %r1,SP_R15(%r15) aghi %r1,-SP_SIZE @@ -654,7 +629,10 @@ io_resume_loop: jg preempt_schedule_irq #endif -io_work_user: +# +# switch to kernel stack, then check TIF bits +# +io_work: lg %r1,__LC_KERNEL_STACK aghi %r1,-SP_SIZE mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) @@ -675,11 +653,6 @@ io_work_loop: j io_restore io_work_done: -#if defined(CONFIG_KVM) || defined(CONFIG_KVM_MODULE) -sie_opcode: - .long 0xb2140000 -#endif - # # _TIF_MCCK_PENDING is set, call handler # diff --git a/trunk/arch/s390/kernel/ptrace.c b/trunk/arch/s390/kernel/ptrace.c index 35827b9bd4d1..7f4270163744 100644 --- a/trunk/arch/s390/kernel/ptrace.c +++ b/trunk/arch/s390/kernel/ptrace.c @@ -292,7 +292,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) return 0; } -long arch_ptrace(struct task_struct *child, long request, long addr, long data) +static int +do_ptrace_normal(struct task_struct *child, long request, long addr, long data) { ptrace_area parea; int copied, ret; @@ -528,19 +529,35 @@ poke_user_emu31(struct task_struct *child, addr_t addr, addr_t data) return 0; } -long compat_arch_ptrace(struct task_struct *child, compat_long_t request, - compat_ulong_t caddr, compat_ulong_t cdata) +static int +do_ptrace_emu31(struct task_struct *child, long request, long addr, long data) { - unsigned long addr = caddr; - unsigned long data = cdata; + unsigned int tmp; /* 4 bytes !! */ ptrace_area_emu31 parea; int copied, ret; switch (request) { + case PTRACE_PEEKTEXT: + case PTRACE_PEEKDATA: + /* read word at location addr. */ + copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); + if (copied != sizeof(tmp)) + return -EIO; + return put_user(tmp, (unsigned int __force __user *) data); + case PTRACE_PEEKUSR: /* read the word at location addr in the USER area. */ return peek_user_emu31(child, addr, data); + case PTRACE_POKETEXT: + case PTRACE_POKEDATA: + /* write the word at location addr. */ + tmp = data; + copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 1); + if (copied != sizeof(tmp)) + return -EIO; + return 0; + case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ return poke_user_emu31(child, addr, data); @@ -570,11 +587,82 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, copied += sizeof(unsigned int); } return 0; + case PTRACE_GETEVENTMSG: + return put_user((__u32) child->ptrace_message, + (unsigned int __force __user *) data); + case PTRACE_GETSIGINFO: + if (child->last_siginfo == NULL) + return -EINVAL; + return copy_siginfo_to_user32((compat_siginfo_t + __force __user *) data, + child->last_siginfo); + case PTRACE_SETSIGINFO: + if (child->last_siginfo == NULL) + return -EINVAL; + return copy_siginfo_from_user32(child->last_siginfo, + (compat_siginfo_t + __force __user *) data); } - return compat_ptrace_request(child, request, addr, data); + return ptrace_request(child, request, addr, data); } #endif +long arch_ptrace(struct task_struct *child, long request, long addr, long data) +{ + switch (request) { + case PTRACE_SYSCALL: + /* continue and stop at next (return from) syscall */ + case PTRACE_CONT: + /* restart after signal. */ + if (!valid_signal(data)) + return -EIO; + if (request == PTRACE_SYSCALL) + set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + else + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + child->exit_code = data; + /* make sure the single step bit is not set. */ + user_disable_single_step(child); + wake_up_process(child); + return 0; + + case PTRACE_KILL: + /* + * make the child exit. Best I can do is send it a sigkill. + * perhaps it should be put in the status that it wants to + * exit. + */ + if (child->exit_state == EXIT_ZOMBIE) /* already dead */ + return 0; + child->exit_code = SIGKILL; + /* make sure the single step bit is not set. */ + user_disable_single_step(child); + wake_up_process(child); + return 0; + + case PTRACE_SINGLESTEP: + /* set the trap flag. */ + if (!valid_signal(data)) + return -EIO; + clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + child->exit_code = data; + user_enable_single_step(child); + /* give it a chance to run. */ + wake_up_process(child); + return 0; + + /* Do requests that differ for 31/64 bit */ + default: +#ifdef CONFIG_COMPAT + if (test_thread_flag(TIF_31BIT)) + return do_ptrace_emu31(child, request, addr, data); +#endif + return do_ptrace_normal(child, request, addr, data); + } + /* Not reached. */ + return -EIO; +} + asmlinkage void syscall_trace(struct pt_regs *regs, int entryexit) { diff --git a/trunk/arch/s390/kvm/Kconfig b/trunk/arch/s390/kvm/Kconfig index e051cad1f1e0..1761b74d639b 100644 --- a/trunk/arch/s390/kvm/Kconfig +++ b/trunk/arch/s390/kvm/Kconfig @@ -22,6 +22,7 @@ config KVM select PREEMPT_NOTIFIERS select ANON_INODES select S390_SWITCH_AMODE + select PREEMPT ---help--- Support hosting paravirtualized guest machines using the SIE virtualization capability on the mainframe. This should work diff --git a/trunk/arch/s390/kvm/intercept.c b/trunk/arch/s390/kvm/intercept.c index 47a0b642174c..349581a26103 100644 --- a/trunk/arch/s390/kvm/intercept.c +++ b/trunk/arch/s390/kvm/intercept.c @@ -105,9 +105,6 @@ static intercept_handler_t instruction_handlers[256] = { static int handle_noop(struct kvm_vcpu *vcpu) { switch (vcpu->arch.sie_block->icptcode) { - case 0x0: - vcpu->stat.exit_null++; - break; case 0x10: vcpu->stat.exit_external_request++; break; diff --git a/trunk/arch/s390/kvm/kvm-s390.c b/trunk/arch/s390/kvm/kvm-s390.c index 0ac36a649eba..98d1e73e01f1 100644 --- a/trunk/arch/s390/kvm/kvm-s390.c +++ b/trunk/arch/s390/kvm/kvm-s390.c @@ -31,7 +31,6 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { { "userspace_handled", VCPU_STAT(exit_userspace) }, - { "exit_null", VCPU_STAT(exit_null) }, { "exit_validity", VCPU_STAT(exit_validity) }, { "exit_stop_request", VCPU_STAT(exit_stop_request) }, { "exit_external_request", VCPU_STAT(exit_external_request) }, @@ -222,6 +221,10 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) vcpu->arch.guest_fpregs.fpc &= FPC_VALID_MASK; restore_fp_regs(&vcpu->arch.guest_fpregs); restore_access_regs(vcpu->arch.guest_acrs); + + if (signal_pending(current)) + atomic_set_mask(CPUSTAT_STOP_INT, + &vcpu->arch.sie_block->cpuflags); } void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) diff --git a/trunk/arch/s390/mm/Makefile b/trunk/arch/s390/mm/Makefile index 2a7458134544..fb988a48a754 100644 --- a/trunk/arch/s390/mm/Makefile +++ b/trunk/arch/s390/mm/Makefile @@ -5,4 +5,3 @@ obj-y := init.o fault.o extmem.o mmap.o vmem.o pgtable.o obj-$(CONFIG_CMM) += cmm.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o -obj-$(CONFIG_PAGE_STATES) += page-states.o diff --git a/trunk/arch/s390/mm/init.c b/trunk/arch/s390/mm/init.c index 29f3a63806b9..fa31de6ae97a 100644 --- a/trunk/arch/s390/mm/init.c +++ b/trunk/arch/s390/mm/init.c @@ -126,9 +126,6 @@ void __init mem_init(void) /* clear the zero-page */ memset(empty_zero_page, 0, PAGE_SIZE); - /* Setup guest page hinting */ - cmma_init(); - /* this will put all low memory onto the freelists */ totalram_pages += free_all_bootmem(); diff --git a/trunk/arch/s390/mm/page-states.c b/trunk/arch/s390/mm/page-states.c deleted file mode 100644 index fc0ad73ffd90..000000000000 --- a/trunk/arch/s390/mm/page-states.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * arch/s390/mm/page-states.c - * - * Copyright IBM Corp. 2008 - * - * Guest page hinting for unused pages. - * - * Author(s): Martin Schwidefsky - */ - -#include -#include -#include -#include -#include - -#define ESSA_SET_STABLE 1 -#define ESSA_SET_UNUSED 2 - -static int cmma_flag; - -static int __init cmma(char *str) -{ - char *parm; - parm = strstrip(str); - if (strcmp(parm, "yes") == 0 || strcmp(parm, "on") == 0) { - cmma_flag = 1; - return 1; - } - cmma_flag = 0; - if (strcmp(parm, "no") == 0 || strcmp(parm, "off") == 0) - return 1; - return 0; -} - -__setup("cmma=", cmma); - -void __init cmma_init(void) -{ - register unsigned long tmp asm("0") = 0; - register int rc asm("1") = -EOPNOTSUPP; - - if (!cmma_flag) - return; - asm volatile( - " .insn rrf,0xb9ab0000,%1,%1,0,0\n" - "0: la %0,0\n" - "1:\n" - EX_TABLE(0b,1b) - : "+&d" (rc), "+&d" (tmp)); - if (rc) - cmma_flag = 0; -} - -void arch_free_page(struct page *page, int order) -{ - int i, rc; - - if (!cmma_flag) - return; - for (i = 0; i < (1 << order); i++) - asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" - : "=&d" (rc) - : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), - "i" (ESSA_SET_UNUSED)); -} - -void arch_alloc_page(struct page *page, int order) -{ - int i, rc; - - if (!cmma_flag) - return; - for (i = 0; i < (1 << order); i++) - asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" - : "=&d" (rc) - : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), - "i" (ESSA_SET_STABLE)); -} diff --git a/trunk/arch/sparc/kernel/process.c b/trunk/arch/sparc/kernel/process.c index 36431f377dee..e7f35198ae34 100644 --- a/trunk/arch/sparc/kernel/process.c +++ b/trunk/arch/sparc/kernel/process.c @@ -419,26 +419,14 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags, unsigned long stack_size) { unsigned long parent_tid_ptr, child_tid_ptr; - unsigned long orig_i1 = regs->u_regs[UREG_I1]; - long ret; parent_tid_ptr = regs->u_regs[UREG_I2]; child_tid_ptr = regs->u_regs[UREG_I4]; - ret = do_fork(clone_flags, stack_start, - regs, stack_size, - (int __user *) parent_tid_ptr, - (int __user *) child_tid_ptr); - - /* If we get an error and potentially restart the system - * call, we're screwed because copy_thread() clobbered - * the parent's %o1. So detect that case and restore it - * here. - */ - if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK) - regs->u_regs[UREG_I1] = orig_i1; - - return ret; + return do_fork(clone_flags, stack_start, + regs, stack_size, + (int __user *) parent_tid_ptr, + (int __user *) child_tid_ptr); } /* Copy a Sparc thread. The fork() return value conventions diff --git a/trunk/arch/sparc/kernel/sys_sparc.c b/trunk/arch/sparc/kernel/sys_sparc.c index e995491c4436..f188b5dc9fd0 100644 --- a/trunk/arch/sparc/kernel/sys_sparc.c +++ b/trunk/arch/sparc/kernel/sys_sparc.c @@ -223,7 +223,8 @@ int sparc_mmap_check(unsigned long addr, unsigned long len, unsigned long flags) { if (ARCH_SUN4C_SUN4 && (len > 0x20000000 || - (addr < 0xe0000000 && addr + len > 0x20000000))) + ((flags & MAP_FIXED) && + addr < 0xe0000000 && addr + len > 0x20000000))) return -EINVAL; /* See asm-sparc/uaccess.h */ diff --git a/trunk/arch/sparc64/kernel/process.c b/trunk/arch/sparc64/kernel/process.c index 4129c0449856..500ac6d483a0 100644 --- a/trunk/arch/sparc64/kernel/process.c +++ b/trunk/arch/sparc64/kernel/process.c @@ -503,8 +503,6 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags, unsigned long stack_size) { int __user *parent_tid_ptr, *child_tid_ptr; - unsigned long orig_i1 = regs->u_regs[UREG_I1]; - long ret; #ifdef CONFIG_COMPAT if (test_thread_flag(TIF_32BIT)) { @@ -517,19 +515,9 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags, child_tid_ptr = (int __user *) regs->u_regs[UREG_I4]; } - ret = do_fork(clone_flags, stack_start, - regs, stack_size, - parent_tid_ptr, child_tid_ptr); - - /* If we get an error and potentially restart the system - * call, we're screwed because copy_thread() clobbered - * the parent's %o1. So detect that case and restore it - * here. - */ - if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK) - regs->u_regs[UREG_I1] = orig_i1; - - return ret; + return do_fork(clone_flags, stack_start, + regs, stack_size, + parent_tid_ptr, child_tid_ptr); } /* Copy a Sparc thread. The fork() return value conventions diff --git a/trunk/arch/sparc64/kernel/smp.c b/trunk/arch/sparc64/kernel/smp.c index 0d6403a630ac..3aba47624df4 100644 --- a/trunk/arch/sparc64/kernel/smp.c +++ b/trunk/arch/sparc64/kernel/smp.c @@ -865,14 +865,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs) void *info = call_data->info; clear_softint(1 << irq); + + irq_enter(); + + if (!call_data->wait) { + /* let initiator proceed after getting data */ + atomic_inc(&call_data->finished); + } + + func(info); + + irq_exit(); + if (call_data->wait) { /* let initiator proceed only after completion */ - func(info); atomic_inc(&call_data->finished); - } else { - /* let initiator proceed after getting data */ - atomic_inc(&call_data->finished); - func(info); } } @@ -1034,7 +1041,9 @@ void smp_receive_signal(int cpu) void smp_receive_signal_client(int irq, struct pt_regs *regs) { + irq_enter(); clear_softint(1 << irq); + irq_exit(); } void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) @@ -1042,6 +1051,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) struct mm_struct *mm; unsigned long flags; + irq_enter(); + clear_softint(1 << irq); /* See if we need to allocate a new TLB context because @@ -1061,6 +1072,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) load_secondary_context(mm); __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT); + + irq_exit(); } void smp_new_mmu_context_version(void) @@ -1226,6 +1239,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) { clear_softint(1 << irq); + irq_enter(); + preempt_disable(); __asm__ __volatile__("flushw"); @@ -1238,6 +1253,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) prom_world(0); preempt_enable(); + + irq_exit(); } /* /proc/profile writes can call this, don't __init it please. */ diff --git a/trunk/arch/sparc64/kernel/sys_sparc.c b/trunk/arch/sparc64/kernel/sys_sparc.c index 0dbc941f130e..8d4761f15fa9 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc.c +++ b/trunk/arch/sparc64/kernel/sys_sparc.c @@ -549,13 +549,13 @@ int sparc64_mmap_check(unsigned long addr, unsigned long len, if (len >= STACK_TOP32) return -EINVAL; - if (addr > STACK_TOP32 - len) + if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) return -EINVAL; } else { if (len >= VA_EXCLUDE_START) return -EINVAL; - if (invalid_64bit_range(addr, len)) + if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) return -EINVAL; } diff --git a/trunk/arch/sparc64/kernel/sys_sparc32.c b/trunk/arch/sparc64/kernel/sys_sparc32.c index 1aa4288125f2..161ce4710fe7 100644 --- a/trunk/arch/sparc64/kernel/sys_sparc32.c +++ b/trunk/arch/sparc64/kernel/sys_sparc32.c @@ -236,6 +236,13 @@ asmlinkage long sys32_getegid16(void) /* 32-bit timeval and related flotsam. */ +static long get_tv32(struct timeval *o, struct compat_timeval __user *i) +{ + return (!access_ok(VERIFY_READ, i, sizeof(*i)) || + (__get_user(o->tv_sec, &i->tv_sec) | + __get_user(o->tv_usec, &i->tv_usec))); +} + static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i) { return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) || @@ -750,6 +757,30 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv, return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); } +asmlinkage long sys32_utimes(char __user *filename, + struct compat_timeval __user *tvs) +{ + struct timespec tv[2]; + + if (tvs) { + struct timeval ktvs[2]; + if (get_tv32(&ktvs[0], tvs) || + get_tv32(&ktvs[1], 1+tvs)) + return -EFAULT; + + if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 || + ktvs[1].tv_usec < 0 || ktvs[1].tv_usec >= 1000000) + return -EINVAL; + + tv[0].tv_sec = ktvs[0].tv_sec; + tv[0].tv_nsec = 1000 * ktvs[0].tv_usec; + tv[1].tv_sec = ktvs[1].tv_sec; + tv[1].tv_nsec = 1000 * ktvs[1].tv_usec; + } + + return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); +} + /* These are here just in case some old sparc32 binary calls it. */ asmlinkage long sys32_pause(void) { diff --git a/trunk/arch/sparc64/kernel/systbls.S b/trunk/arch/sparc64/kernel/systbls.S index 8b5282d433c4..a4fef2ba1ae1 100644 --- a/trunk/arch/sparc64/kernel/systbls.S +++ b/trunk/arch/sparc64/kernel/systbls.S @@ -45,7 +45,7 @@ sys_call_table32: /*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod .word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate /*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall - .word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64 + .word sys_nis_syscall, sys32_mkdir, sys_rmdir, sys32_utimes, compat_sys_stat64 /*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit .word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write /*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64 diff --git a/trunk/arch/sparc64/mm/init.c b/trunk/arch/sparc64/mm/init.c index ec3e2c72302a..4cad0b32b0af 100644 --- a/trunk/arch/sparc64/mm/init.c +++ b/trunk/arch/sparc64/mm/init.c @@ -771,9 +771,6 @@ static void __init find_ramdisk(unsigned long phys_base) initrd_end = ramdisk_image + sparc_ramdisk_size; lmb_reserve(initrd_start, initrd_end); - - initrd_start += PAGE_OFFSET; - initrd_end += PAGE_OFFSET; } #endif } @@ -2365,3 +2362,16 @@ void __flush_tlb_all(void) __asm__ __volatile__("wrpr %0, 0, %%pstate" : : "r" (pstate)); } + +#ifdef CONFIG_MEMORY_HOTPLUG + +void online_page(struct page *page) +{ + ClearPageReserved(page); + init_page_count(page); + __free_page(page); + totalram_pages++; + num_physpages++; +} + +#endif /* CONFIG_MEMORY_HOTPLUG */ diff --git a/trunk/arch/um/drivers/line.c b/trunk/arch/um/drivers/line.c index 5047490fc299..10b86e1cc659 100644 --- a/trunk/arch/um/drivers/line.c +++ b/trunk/arch/um/drivers/line.c @@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty) line_flush_buffer(tty); } -int line_put_char(struct tty_struct *tty, unsigned char ch) +void line_put_char(struct tty_struct *tty, unsigned char ch) { - return line_write(tty, &ch, sizeof(ch)); + line_write(tty, &ch, sizeof(ch)); } int line_write(struct tty_struct *tty, const unsigned char *buf, int len) diff --git a/trunk/arch/um/include/line.h b/trunk/arch/um/include/line.h index 979b73e6352d..1223f2c844b4 100644 --- a/trunk/arch/um/include/line.h +++ b/trunk/arch/um/include/line.h @@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines, char *init, char **error_out); extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len); -extern int line_put_char(struct tty_struct *tty, unsigned char ch); +extern void line_put_char(struct tty_struct *tty, unsigned char ch); extern void line_set_termios(struct tty_struct *tty, struct ktermios * old); extern int line_chars_in_buffer(struct tty_struct *tty); extern void line_flush_buffer(struct tty_struct *tty); diff --git a/trunk/block/blk-sysfs.c b/trunk/block/blk-sysfs.c index e85c4013e8a2..304ec73ab821 100644 --- a/trunk/block/blk-sysfs.c +++ b/trunk/block/blk-sysfs.c @@ -146,11 +146,13 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page, unsigned long nm; ssize_t ret = queue_var_store(&nm, page, count); + spin_lock_irq(q->queue_lock); if (nm) - set_bit(QUEUE_FLAG_NOMERGES, &q->queue_flags); + queue_flag_set(QUEUE_FLAG_NOMERGES, q); else - clear_bit(QUEUE_FLAG_NOMERGES, &q->queue_flags); + queue_flag_clear(QUEUE_FLAG_NOMERGES, q); + spin_unlock_irq(q->queue_lock); return ret; } diff --git a/trunk/drivers/accessibility/Kconfig b/trunk/drivers/accessibility/Kconfig index ef3b65bfdd0a..1264c4b98094 100644 --- a/trunk/drivers/accessibility/Kconfig +++ b/trunk/drivers/accessibility/Kconfig @@ -1,17 +1,7 @@ menuconfig ACCESSIBILITY bool "Accessibility support" ---help--- - Accessibility handles all special kinds of hardware devices or - software adapters which help people with disabilities (e.g. - blindness) to use computers. - - That includes braille devices, speech synthesis, keyboard - remapping, etc. - - Say Y here to get to see options for accessibility. - This option alone does not add any kernel code. - - If you say N, all options in this submenu will be skipped and disabled. + Enable a submenu where accessibility items may be enabled. If unsure, say N. diff --git a/trunk/drivers/char/sx.c b/trunk/drivers/char/sx.c index b1a7a8cb65ea..f39f6fd89350 100644 --- a/trunk/drivers/char/sx.c +++ b/trunk/drivers/char/sx.c @@ -970,8 +970,7 @@ static int sx_set_real_termios(void *ptr) sx_write_channel_byte(port, hi_mask, 0x1f); break; default: - printk(KERN_INFO "sx: Invalid wordsize: %u\n", - (unsigned int)CFLAG & CSIZE); + printk(KERN_INFO "sx: Invalid wordsize: %u\n", CFLAG & CSIZE); break; } @@ -998,8 +997,7 @@ static int sx_set_real_termios(void *ptr) set_bit(TTY_HW_COOK_IN, &port->gs.tty->flags); } sx_dprintk(SX_DEBUG_TERMIOS, "iflags: %x(%d) ", - (unsigned int)port->gs.tty->termios->c_iflag, - I_OTHER(port->gs.tty)); + port->gs.tty->termios->c_iflag, I_OTHER(port->gs.tty)); /* Tell line discipline whether we will do output cooking. * If OPOST is set and no other output flags are set then we can do output @@ -1012,8 +1010,7 @@ static int sx_set_real_termios(void *ptr) clear_bit(TTY_HW_COOK_OUT, &port->gs.tty->flags); } sx_dprintk(SX_DEBUG_TERMIOS, "oflags: %x(%d)\n", - (unsigned int)port->gs.tty->termios->c_oflag, - O_OTHER(port->gs.tty)); + port->gs.tty->termios->c_oflag, O_OTHER(port->gs.tty)); /* port->c_dcd = sx_get_CD (port); */ func_exit(); return 0; diff --git a/trunk/drivers/char/vt.c b/trunk/drivers/char/vt.c index fa1ffbf2c621..e458b08139af 100644 --- a/trunk/drivers/char/vt.c +++ b/trunk/drivers/char/vt.c @@ -2742,10 +2742,6 @@ static int con_open(struct tty_struct *tty, struct file *filp) tty->winsize.ws_row = vc_cons[currcons].d->vc_rows; tty->winsize.ws_col = vc_cons[currcons].d->vc_cols; } - if (vc->vc_utf) - tty->termios->c_iflag |= IUTF8; - else - tty->termios->c_iflag &= ~IUTF8; release_console_sem(); vcs_make_sysfs(tty); return ret; @@ -2922,8 +2918,6 @@ int __init vty_init(void) console_driver->minor_start = 1; console_driver->type = TTY_DRIVER_TYPE_CONSOLE; console_driver->init_termios = tty_std_termios; - if (default_utf8) - console_driver->init_termios.c_iflag |= IUTF8; console_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS; tty_set_operations(console_driver, &con_ops); if (tty_register_driver(console_driver)) diff --git a/trunk/drivers/md/raid10.c b/trunk/drivers/md/raid10.c index faf3d8912979..5938fa962922 100644 --- a/trunk/drivers/md/raid10.c +++ b/trunk/drivers/md/raid10.c @@ -886,7 +886,7 @@ static int make_request(struct request_queue *q, struct bio * bio) */ raid10_find_phys(conf, r10_bio); retry_write: - blocked_rdev = NULL; + blocked_rdev = 0; rcu_read_lock(); for (i = 0; i < conf->copies; i++) { int d = r10_bio->devs[i].devnum; diff --git a/trunk/drivers/media/video/cx18/cx18-driver.c b/trunk/drivers/media/video/cx18/cx18-driver.c index 3f55d47bc4b9..8f5ed9b4bf83 100644 --- a/trunk/drivers/media/video/cx18/cx18-driver.c +++ b/trunk/drivers/media/video/cx18/cx18-driver.c @@ -613,7 +613,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, } cx = kzalloc(sizeof(struct cx18), GFP_ATOMIC); - if (!cx) { + if (cx == 0) { spin_unlock(&cx18_cards_lock); return -ENOMEM; } diff --git a/trunk/drivers/media/video/saa7134/saa7134-video.c b/trunk/drivers/media/video/saa7134/saa7134-video.c index 48e1a01718ec..a0baf2d0ba7f 100644 --- a/trunk/drivers/media/video/saa7134/saa7134-video.c +++ b/trunk/drivers/media/video/saa7134/saa7134-video.c @@ -1634,7 +1634,7 @@ static int saa7134_s_fmt_overlay(struct file *file, void *priv, struct saa7134_fh *fh = priv; struct saa7134_dev *dev = fh->dev; int err; - unsigned long flags; + unsigned int flags; if (saa7134_no_overlay > 0) { printk(KERN_ERR "V4L2_BUF_TYPE_VIDEO_OVERLAY: no_overlay\n"); diff --git a/trunk/drivers/net/usb/asix.c b/trunk/drivers/net/usb/asix.c index dc6f097062df..6f245cfb6624 100644 --- a/trunk/drivers/net/usb/asix.c +++ b/trunk/drivers/net/usb/asix.c @@ -1380,10 +1380,6 @@ static const struct usb_device_id products [] = { // Buffalo LUA-U2-KTX USB_DEVICE (0x0411, 0x003d), .driver_info = (unsigned long) &ax8817x_info, -}, { - // Buffalo LUA-U2-GT 10/100/1000 - USB_DEVICE (0x0411, 0x006e), - .driver_info = (unsigned long) &ax88178_info, }, { // Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter" USB_DEVICE (0x6189, 0x182d), diff --git a/trunk/drivers/rtc/rtc-ds1511.c b/trunk/drivers/rtc/rtc-ds1511.c index 0f0d27d1c4ca..a83a40b3ebaa 100644 --- a/trunk/drivers/rtc/rtc-ds1511.c +++ b/trunk/drivers/rtc/rtc-ds1511.c @@ -184,7 +184,7 @@ ds1511_wdog_disable(void) static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) { u8 mon, day, dow, hrs, min, sec, yrs, cen; - unsigned long flags; + unsigned int flags; /* * won't have to change this for a while @@ -247,7 +247,7 @@ static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm) static int ds1511_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm) { unsigned int century; - unsigned long flags; + unsigned int flags; spin_lock_irqsave(&ds1511_lock, flags); rtc_disable_update(); diff --git a/trunk/drivers/s390/char/tty3270.c b/trunk/drivers/s390/char/tty3270.c index 5043150019ac..c1f2adefad41 100644 --- a/trunk/drivers/s390/char/tty3270.c +++ b/trunk/drivers/s390/char/tty3270.c @@ -965,7 +965,8 @@ tty3270_write_room(struct tty_struct *tty) * Insert character into the screen at the current position with the * current color and highlight. This function does NOT do cursor movement. */ -static void tty3270_put_character(struct tty3270 *tp, char ch) +static int +tty3270_put_character(struct tty3270 *tp, char ch) { struct tty3270_line *line; struct tty3270_cell *cell; @@ -985,6 +986,7 @@ static void tty3270_put_character(struct tty3270 *tp, char ch) cell->character = tp->view.ascebc[(unsigned int) ch]; cell->highlight = tp->highlight; cell->f_color = tp->f_color; + return 1; } /* @@ -1610,15 +1612,16 @@ tty3270_write(struct tty_struct * tty, /* * Put single characters to the ttys character buffer */ -static int tty3270_put_char(struct tty_struct *tty, unsigned char ch) +static void +tty3270_put_char(struct tty_struct *tty, unsigned char ch) { struct tty3270 *tp; tp = tty->driver_data; - if (!tp || tp->char_count >= TTY3270_CHAR_BUF_SIZE) - return 0; - tp->char_buf[tp->char_count++] = ch; - return 1; + if (!tp) + return; + if (tp->char_count < TTY3270_CHAR_BUF_SIZE) + tp->char_buf[tp->char_count++] = ch; } /* diff --git a/trunk/drivers/s390/cio/blacklist.c b/trunk/drivers/s390/cio/blacklist.c index 9c21b8f43f9b..40ef948fcb3a 100644 --- a/trunk/drivers/s390/cio/blacklist.c +++ b/trunk/drivers/s390/cio/blacklist.c @@ -19,7 +19,6 @@ #include #include -#include #include "blacklist.h" #include "cio.h" @@ -44,169 +43,164 @@ typedef enum {add, free} range_action; * Function: blacklist_range * (Un-)blacklist the devices from-to */ -static int blacklist_range(range_action action, unsigned int from_ssid, - unsigned int to_ssid, unsigned int from, - unsigned int to, int msgtrigger) +static void +blacklist_range (range_action action, unsigned int from, unsigned int to, + unsigned int ssid) { - if ((from_ssid > to_ssid) || ((from_ssid == to_ssid) && (from > to))) { - if (msgtrigger) - printk(KERN_WARNING "cio: Invalid cio_ignore range " - "0.%x.%04x-0.%x.%04x\n", from_ssid, from, - to_ssid, to); - return 1; + if (!to) + to = from; + + if (from > to || to > __MAX_SUBCHANNEL || ssid > __MAX_SSID) { + printk (KERN_WARNING "cio: Invalid blacklist range " + "0.%x.%04x to 0.%x.%04x, skipping\n", + ssid, from, ssid, to); + return; } - - while ((from_ssid < to_ssid) || ((from_ssid == to_ssid) && - (from <= to))) { + for (; from <= to; from++) { if (action == add) - set_bit(from, bl_dev[from_ssid]); + set_bit (from, bl_dev[ssid]); else - clear_bit(from, bl_dev[from_ssid]); - from++; - if (from > __MAX_SUBCHANNEL) { - from_ssid++; - from = 0; - } + clear_bit (from, bl_dev[ssid]); } - - return 0; } -static int pure_hex(char **cp, unsigned int *val, int min_digit, - int max_digit, int max_val) +/* + * Function: blacklist_busid + * Get devno/busid from given string. + * Shamelessly grabbed from dasd_devmap.c. + */ +static int +blacklist_busid(char **str, int *id0, int *ssid, int *devno) { - int diff; - unsigned int value; + int val, old_style; + char *sav; - diff = 0; - *val = 0; + sav = *str; - while (isxdigit(**cp) && (diff <= max_digit)) { - - if (isdigit(**cp)) - value = **cp - '0'; - else - value = tolower(**cp) - 'a' + 10; - *val = *val * 16 + value; - (*cp)++; - diff++; + /* check for leading '0x' */ + old_style = 0; + if ((*str)[0] == '0' && (*str)[1] == 'x') { + *str += 2; + old_style = 1; } - - if ((diff < min_digit) || (diff > max_digit) || (*val > max_val)) - return 1; - + if (!isxdigit((*str)[0])) /* We require at least one hex digit */ + goto confused; + val = simple_strtoul(*str, str, 16); + if (old_style || (*str)[0] != '.') { + *id0 = *ssid = 0; + if (val < 0 || val > 0xffff) + goto confused; + *devno = val; + if ((*str)[0] != ',' && (*str)[0] != '-' && + (*str)[0] != '\n' && (*str)[0] != '\0') + goto confused; + return 0; + } + /* New style x.y.z busid */ + if (val < 0 || val > 0xff) + goto confused; + *id0 = val; + (*str)++; + if (!isxdigit((*str)[0])) /* We require at least one hex digit */ + goto confused; + val = simple_strtoul(*str, str, 16); + if (val < 0 || val > 0xff || (*str)++[0] != '.') + goto confused; + *ssid = val; + if (!isxdigit((*str)[0])) /* We require at least one hex digit */ + goto confused; + val = simple_strtoul(*str, str, 16); + if (val < 0 || val > 0xffff) + goto confused; + *devno = val; + if ((*str)[0] != ',' && (*str)[0] != '-' && + (*str)[0] != '\n' && (*str)[0] != '\0') + goto confused; return 0; +confused: + strsep(str, ",\n"); + printk(KERN_WARNING "cio: Invalid cio_ignore parameter '%s'\n", sav); + return 1; } -static int parse_busid(char *str, int *cssid, int *ssid, int *devno, - int msgtrigger) +static int +blacklist_parse_parameters (char *str, range_action action) { - char *str_work; - int val, rc, ret; - - rc = 1; - - if (*str == '\0') - goto out; - - /* old style */ - str_work = str; - val = simple_strtoul(str, &str_work, 16); - - if (*str_work == '\0') { - if (val <= __MAX_SUBCHANNEL) { - *devno = val; - *ssid = 0; - *cssid = 0; - rc = 0; + int from, to, from_id0, to_id0, from_ssid, to_ssid; + + while (*str != 0 && *str != '\n') { + range_action ra = action; + while(*str == ',') + str++; + if (*str == '!') { + ra = !action; + ++str; } - goto out; - } - /* new style */ - str_work = str; - ret = pure_hex(&str_work, cssid, 1, 2, __MAX_CSSID); - if (ret || (str_work[0] != '.')) - goto out; - str_work++; - ret = pure_hex(&str_work, ssid, 1, 1, __MAX_SSID); - if (ret || (str_work[0] != '.')) - goto out; - str_work++; - ret = pure_hex(&str_work, devno, 4, 4, __MAX_SUBCHANNEL); - if (ret || (str_work[0] != '\0')) - goto out; - - rc = 0; -out: - if (rc && msgtrigger) - printk(KERN_WARNING "cio: Invalid cio_ignore device '%s'\n", - str); - - return rc; -} - -static int blacklist_parse_parameters(char *str, range_action action, - int msgtrigger) -{ - int from_cssid, to_cssid, from_ssid, to_ssid, from, to; - int rc, totalrc; - char *parm; - range_action ra; - - totalrc = 0; - - while ((parm = strsep(&str, ","))) { - rc = 0; - ra = action; - if (*parm == '!') { - if (ra == add) - ra = free; - else - ra = add; - parm++; - } - if (strcmp(parm, "all") == 0) { - from_cssid = 0; - from_ssid = 0; - from = 0; - to_cssid = __MAX_CSSID; - to_ssid = __MAX_SSID; - to = __MAX_SUBCHANNEL; + /* + * Since we have to parse the proc commands and the + * kernel arguments we have to check four cases + */ + if (strncmp(str,"all,",4) == 0 || strcmp(str,"all") == 0 || + strncmp(str,"all\n",4) == 0 || strncmp(str,"all ",4) == 0) { + int j; + + str += 3; + for (j=0; j <= __MAX_SSID; j++) + blacklist_range(ra, 0, __MAX_SUBCHANNEL, j); } else { - rc = parse_busid(strsep(&parm, "-"), &from_cssid, - &from_ssid, &from, msgtrigger); - if (!rc) { - if (parm != NULL) - rc = parse_busid(parm, &to_cssid, - &to_ssid, &to, - msgtrigger); - else { - to_cssid = from_cssid; - to_ssid = from_ssid; - to = from; - } + int rc; + + rc = blacklist_busid(&str, &from_id0, + &from_ssid, &from); + if (rc) + continue; + to = from; + to_id0 = from_id0; + to_ssid = from_ssid; + if (*str == '-') { + str++; + rc = blacklist_busid(&str, &to_id0, + &to_ssid, &to); + if (rc) + continue; } + if (*str == '-') { + printk(KERN_WARNING "cio: invalid cio_ignore " + "parameter '%s'\n", + strsep(&str, ",\n")); + continue; + } + if ((from_id0 != to_id0) || + (from_ssid != to_ssid)) { + printk(KERN_WARNING "cio: invalid cio_ignore " + "range %x.%x.%04x-%x.%x.%04x\n", + from_id0, from_ssid, from, + to_id0, to_ssid, to); + continue; + } + blacklist_range (ra, from, to, to_ssid); } - if (!rc) { - rc = blacklist_range(ra, from_ssid, to_ssid, from, to, - msgtrigger); - if (rc) - totalrc = 1; - } else - totalrc = 1; } - - return totalrc; + return 1; } +/* Parsing the commandline for blacklist parameters, e.g. to blacklist + * bus ids 0.0.1234, 0.0.1235 and 0.0.1236, you could use any of: + * - cio_ignore=1234-1236 + * - cio_ignore=0x1234-0x1235,1236 + * - cio_ignore=0x1234,1235-1236 + * - cio_ignore=1236 cio_ignore=1234-0x1236 + * - cio_ignore=1234 cio_ignore=1236 cio_ignore=0x1235 + * - cio_ignore=0.0.1234-0.0.1236 + * - cio_ignore=0.0.1234,0x1235,1236 + * - ... + */ static int __init blacklist_setup (char *str) { CIO_MSG_EVENT(6, "Reading blacklist parameters\n"); - if (blacklist_parse_parameters(str, add, 1)) - return 0; - return 1; + return blacklist_parse_parameters (str, add); } __setup ("cio_ignore=", blacklist_setup); @@ -230,23 +224,27 @@ is_blacklisted (int ssid, int devno) * Function: blacklist_parse_proc_parameters * parse the stuff which is piped to /proc/cio_ignore */ -static int blacklist_parse_proc_parameters(char *buf) +static void +blacklist_parse_proc_parameters (char *buf) { - int rc; - char *parm; - - parm = strsep(&buf, " "); - - if (strcmp("free", parm) == 0) - rc = blacklist_parse_parameters(buf, free, 0); - else if (strcmp("add", parm) == 0) - rc = blacklist_parse_parameters(buf, add, 0); - else - return 1; + if (strncmp (buf, "free ", 5) == 0) { + blacklist_parse_parameters (buf + 5, free); + } else if (strncmp (buf, "add ", 4) == 0) { + /* + * We don't need to check for known devices since + * css_probe_device will handle this correctly. + */ + blacklist_parse_parameters (buf + 4, add); + } else { + printk (KERN_WARNING "cio: cio_ignore: Parse error; \n" + KERN_WARNING "try using 'free all|," + ",...'\n" + KERN_WARNING "or 'add ," + ",...'\n"); + return; + } css_schedule_reprobe(); - - return rc; } /* Iterator struct for all devices. */ @@ -330,8 +328,6 @@ cio_ignore_write(struct file *file, const char __user *user_buf, size_t user_len, loff_t *offset) { char *buf; - size_t i; - ssize_t rc, ret; if (*offset) return -EINVAL; @@ -340,27 +336,16 @@ cio_ignore_write(struct file *file, const char __user *user_buf, buf = vmalloc (user_len + 1); /* maybe better use the stack? */ if (buf == NULL) return -ENOMEM; - memset(buf, 0, user_len + 1); - if (strncpy_from_user (buf, user_buf, user_len) < 0) { - rc = -EFAULT; - goto out_free; + vfree (buf); + return -EFAULT; } + buf[user_len] = '\0'; - i = user_len - 1; - while ((i >= 0) && (isspace(buf[i]) || (buf[i] == 0))) { - buf[i] = '\0'; - i--; - } - ret = blacklist_parse_proc_parameters(buf); - if (ret) - rc = -EINVAL; - else - rc = user_len; + blacklist_parse_proc_parameters (buf); -out_free: vfree (buf); - return rc; + return user_len; } static const struct seq_operations cio_ignore_proc_seq_ops = { diff --git a/trunk/drivers/s390/cio/cio.c b/trunk/drivers/s390/cio/cio.c index 82c6a2d45128..08a578161306 100644 --- a/trunk/drivers/s390/cio/cio.c +++ b/trunk/drivers/s390/cio/cio.c @@ -39,6 +39,23 @@ debug_info_t *cio_debug_msg_id; debug_info_t *cio_debug_trace_id; debug_info_t *cio_debug_crw_id; +int cio_show_msg; + +static int __init +cio_setup (char *parm) +{ + if (!strcmp (parm, "yes")) + cio_show_msg = 1; + else if (!strcmp (parm, "no")) + cio_show_msg = 0; + else + printk(KERN_ERR "cio: cio_setup: " + "invalid cio_msg parameter '%s'", parm); + return 1; +} + +__setup ("cio_msg=", cio_setup); + /* * Function: cio_debug_init * Initializes three debug logs for common I/O: @@ -149,7 +166,7 @@ cio_start_handle_notoper(struct subchannel *sch, __u8 lpm) stsch (sch->schid, &sch->schib); - CIO_MSG_EVENT(2, "cio_start: 'not oper' status for " + CIO_MSG_EVENT(0, "cio_start: 'not oper' status for " "subchannel 0.%x.%04x!\n", sch->schid.ssid, sch->schid.sch_no); sprintf(dbf_text, "no%s", sch->dev.bus_id); @@ -550,9 +567,10 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid) * ... just being curious we check for non I/O subchannels */ if (sch->st != 0) { - CIO_MSG_EVENT(4, "Subchannel 0.%x.%04x reports " - "non-I/O subchannel type %04X\n", - sch->schid.ssid, sch->schid.sch_no, sch->st); + CIO_DEBUG(KERN_INFO, 0, + "Subchannel 0.%x.%04x reports " + "non-I/O subchannel type %04X\n", + sch->schid.ssid, sch->schid.sch_no, sch->st); /* We stop here for non-io subchannels. */ err = sch->st; goto out; @@ -570,7 +588,7 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid) * This device must not be known to Linux. So we simply * say that there is no device and return ENODEV. */ - CIO_MSG_EVENT(6, "Blacklisted device detected " + CIO_MSG_EVENT(4, "Blacklisted device detected " "at devno %04X, subchannel set %x\n", sch->schib.pmcw.dev, sch->schid.ssid); err = -ENODEV; @@ -583,11 +601,12 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid) sch->lpm = sch->schib.pmcw.pam & sch->opm; sch->isc = 3; - CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X " - "- PIM = %02X, PAM = %02X, POM = %02X\n", - sch->schib.pmcw.dev, sch->schid.ssid, - sch->schid.sch_no, sch->schib.pmcw.pim, - sch->schib.pmcw.pam, sch->schib.pmcw.pom); + CIO_DEBUG(KERN_INFO, 0, + "Detected device %04x on subchannel 0.%x.%04X" + " - PIM = %02X, PAM = %02X, POM = %02X\n", + sch->schib.pmcw.dev, sch->schid.ssid, + sch->schid.sch_no, sch->schib.pmcw.pim, + sch->schib.pmcw.pam, sch->schib.pmcw.pom); /* * We now have to initially ... diff --git a/trunk/drivers/s390/cio/cio.h b/trunk/drivers/s390/cio/cio.h index 6e933aebe013..3c75412904dc 100644 --- a/trunk/drivers/s390/cio/cio.h +++ b/trunk/drivers/s390/cio/cio.h @@ -118,4 +118,6 @@ extern void *cio_get_console_priv(void); #define cio_get_console_priv() NULL #endif +extern int cio_show_msg; + #endif diff --git a/trunk/drivers/s390/cio/cio_debug.h b/trunk/drivers/s390/cio/cio_debug.h index e64e8278c42e..d7429ef6c666 100644 --- a/trunk/drivers/s390/cio/cio_debug.h +++ b/trunk/drivers/s390/cio/cio_debug.h @@ -31,4 +31,10 @@ static inline void CIO_HEX_EVENT(int level, void *data, int length) } } +#define CIO_DEBUG(printk_level, event_level, msg...) do { \ + if (cio_show_msg) \ + printk(printk_level "cio: " msg); \ + CIO_MSG_EVENT(event_level, msg); \ + } while (0) + #endif diff --git a/trunk/drivers/s390/cio/css.c b/trunk/drivers/s390/cio/css.c index a76956512b2d..595e327d2f76 100644 --- a/trunk/drivers/s390/cio/css.c +++ b/trunk/drivers/s390/cio/css.c @@ -570,7 +570,7 @@ static void reprobe_all(struct work_struct *unused) { int ret; - CIO_MSG_EVENT(4, "reprobe start\n"); + CIO_MSG_EVENT(2, "reprobe start\n"); need_reprobe = 0; /* Make sure initial subchannel scan is done. */ @@ -578,7 +578,7 @@ static void reprobe_all(struct work_struct *unused) atomic_read(&ccw_device_init_count) == 0); ret = for_each_subchannel_staged(NULL, reprobe_subchannel, NULL); - CIO_MSG_EVENT(4, "reprobe done (rc=%d, need_reprobe=%d)\n", ret, + CIO_MSG_EVENT(2, "reprobe done (rc=%d, need_reprobe=%d)\n", ret, need_reprobe); } diff --git a/trunk/drivers/s390/cio/device.c b/trunk/drivers/s390/cio/device.c index e22813db74a2..abfd601d237a 100644 --- a/trunk/drivers/s390/cio/device.c +++ b/trunk/drivers/s390/cio/device.c @@ -341,7 +341,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev) rc = device_schedule_callback(&cdev->dev, ccw_device_remove_orphan_cb); if (rc) - CIO_MSG_EVENT(0, "Couldn't unregister orphan " + CIO_MSG_EVENT(2, "Couldn't unregister orphan " "0.%x.%04x\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -351,7 +351,7 @@ ccw_device_remove_disconnected(struct ccw_device *cdev) rc = device_schedule_callback(cdev->dev.parent, ccw_device_remove_sch_cb); if (rc) - CIO_MSG_EVENT(0, "Couldn't unregister disconnected device " + CIO_MSG_EVENT(2, "Couldn't unregister disconnected device " "0.%x.%04x\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -397,7 +397,7 @@ int ccw_device_set_offline(struct ccw_device *cdev) if (ret == 0) wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); else { - CIO_MSG_EVENT(0, "ccw_device_offline returned %d, " + CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " "device 0.%x.%04x\n", ret, cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -433,7 +433,7 @@ int ccw_device_set_online(struct ccw_device *cdev) if (ret == 0) wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); else { - CIO_MSG_EVENT(0, "ccw_device_online returned %d, " + CIO_MSG_EVENT(2, "ccw_device_online returned %d, " "device 0.%x.%04x\n", ret, cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -451,7 +451,7 @@ int ccw_device_set_online(struct ccw_device *cdev) if (ret == 0) wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); else - CIO_MSG_EVENT(0, "ccw_device_offline returned %d, " + CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " "device 0.%x.%04x\n", ret, cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -803,7 +803,7 @@ static void sch_attach_disconnected_device(struct subchannel *sch, other_sch = to_subchannel(get_device(cdev->dev.parent)); ret = device_move(&cdev->dev, &sch->dev); if (ret) { - CIO_MSG_EVENT(0, "Moving disconnected device 0.%x.%04x failed " + CIO_MSG_EVENT(2, "Moving disconnected device 0.%x.%04x failed " "(ret=%d)!\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno, ret); put_device(&other_sch->dev); @@ -933,7 +933,7 @@ io_subchannel_register(struct work_struct *work) ret = device_reprobe(&cdev->dev); if (ret) /* We can't do much here. */ - CIO_MSG_EVENT(0, "device_reprobe() returned" + CIO_MSG_EVENT(2, "device_reprobe() returned" " %d for 0.%x.%04x\n", ret, cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -1086,7 +1086,7 @@ static void ccw_device_move_to_sch(struct work_struct *work) rc = device_move(&cdev->dev, &sch->dev); mutex_unlock(&sch->reg_mutex); if (rc) { - CIO_MSG_EVENT(0, "Moving device 0.%x.%04x to subchannel " + CIO_MSG_EVENT(2, "Moving device 0.%x.%04x to subchannel " "0.%x.%04x failed (ret=%d)!\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno, sch->schid.ssid, @@ -1446,7 +1446,8 @@ ccw_device_remove (struct device *dev) wait_event(cdev->private->wait_q, dev_fsm_final_state(cdev)); else - CIO_MSG_EVENT(0, "ccw_device_offline returned %d, " + //FIXME: we can't fail! + CIO_MSG_EVENT(2, "ccw_device_offline returned %d, " "device 0.%x.%04x\n", ret, cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -1523,7 +1524,7 @@ static int recovery_check(struct device *dev, void *data) spin_lock_irq(cdev->ccwlock); switch (cdev->private->state) { case DEV_STATE_DISCONNECTED: - CIO_MSG_EVENT(4, "recovery: trigger 0.%x.%04x\n", + CIO_MSG_EVENT(3, "recovery: trigger 0.%x.%04x\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno); dev_fsm_event(cdev, DEV_EVENT_VERIFY); @@ -1553,7 +1554,7 @@ static void recovery_work_func(struct work_struct *unused) } spin_unlock_irq(&recovery_lock); } else - CIO_MSG_EVENT(4, "recovery: end\n"); + CIO_MSG_EVENT(2, "recovery: end\n"); } static DECLARE_WORK(recovery_work, recovery_work_func); @@ -1571,7 +1572,7 @@ void ccw_device_schedule_recovery(void) { unsigned long flags; - CIO_MSG_EVENT(4, "recovery: schedule\n"); + CIO_MSG_EVENT(2, "recovery: schedule\n"); spin_lock_irqsave(&recovery_lock, flags); if (!timer_pending(&recovery_timer) || (recovery_phase != 0)) { recovery_phase = 0; diff --git a/trunk/drivers/s390/cio/device_fsm.c b/trunk/drivers/s390/cio/device_fsm.c index e268d5a77c12..99403b0a97a7 100644 --- a/trunk/drivers/s390/cio/device_fsm.c +++ b/trunk/drivers/s390/cio/device_fsm.c @@ -322,10 +322,10 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) same_dev = 0; /* Keep the compiler quiet... */ switch (state) { case DEV_STATE_NOT_OPER: - CIO_MSG_EVENT(2, "SenseID : unknown device %04x on " - "subchannel 0.%x.%04x\n", - cdev->private->dev_id.devno, - sch->schid.ssid, sch->schid.sch_no); + CIO_DEBUG(KERN_WARNING, 2, + "SenseID : unknown device %04x on subchannel " + "0.%x.%04x\n", cdev->private->dev_id.devno, + sch->schid.ssid, sch->schid.sch_no); break; case DEV_STATE_OFFLINE: if (cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID) { @@ -348,19 +348,20 @@ ccw_device_recog_done(struct ccw_device *cdev, int state) return; } /* Issue device info message. */ - CIO_MSG_EVENT(4, "SenseID : device 0.%x.%04x reports: " - "CU Type/Mod = %04X/%02X, Dev Type/Mod = " - "%04X/%02X\n", - cdev->private->dev_id.ssid, - cdev->private->dev_id.devno, - cdev->id.cu_type, cdev->id.cu_model, - cdev->id.dev_type, cdev->id.dev_model); + CIO_DEBUG(KERN_INFO, 2, + "SenseID : device 0.%x.%04x reports: " + "CU Type/Mod = %04X/%02X, Dev Type/Mod = " + "%04X/%02X\n", + cdev->private->dev_id.ssid, + cdev->private->dev_id.devno, + cdev->id.cu_type, cdev->id.cu_model, + cdev->id.dev_type, cdev->id.dev_model); break; case DEV_STATE_BOXED: - CIO_MSG_EVENT(0, "SenseID : boxed device %04x on " - " subchannel 0.%x.%04x\n", - cdev->private->dev_id.devno, - sch->schid.ssid, sch->schid.sch_no); + CIO_DEBUG(KERN_WARNING, 2, + "SenseID : boxed device %04x on subchannel " + "0.%x.%04x\n", cdev->private->dev_id.devno, + sch->schid.ssid, sch->schid.sch_no); break; } cdev->private->state = state; @@ -442,8 +443,9 @@ ccw_device_done(struct ccw_device *cdev, int state) if (state == DEV_STATE_BOXED) - CIO_MSG_EVENT(0, "Boxed device %04x on subchannel %04x\n", - cdev->private->dev_id.devno, sch->schid.sch_no); + CIO_DEBUG(KERN_WARNING, 2, + "Boxed device %04x on subchannel %04x\n", + cdev->private->dev_id.devno, sch->schid.sch_no); if (cdev->private->flags.donotify) { cdev->private->flags.donotify = 0; @@ -898,7 +900,7 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) /* Basic sense hasn't started. Try again. */ ccw_device_do_sense(cdev, irb); else { - CIO_MSG_EVENT(0, "0.%x.%04x: unsolicited " + CIO_MSG_EVENT(2, "Huh? 0.%x.%04x: unsolicited " "interrupt during w4sense...\n", cdev->private->dev_id.ssid, cdev->private->dev_id.devno); @@ -1167,10 +1169,8 @@ ccw_device_nop(struct ccw_device *cdev, enum dev_event dev_event) static void ccw_device_bug(struct ccw_device *cdev, enum dev_event dev_event) { - CIO_MSG_EVENT(0, "Internal state [%i][%i] not handled for device " - "0.%x.%04x\n", cdev->private->state, dev_event, - cdev->private->dev_id.ssid, - cdev->private->dev_id.devno); + CIO_MSG_EVENT(0, "dev_jumptable[%i][%i] == NULL\n", + cdev->private->state, dev_event); BUG(); } diff --git a/trunk/drivers/s390/cio/device_id.c b/trunk/drivers/s390/cio/device_id.c index cba7020517ed..dc4d87f77f6c 100644 --- a/trunk/drivers/s390/cio/device_id.c +++ b/trunk/drivers/s390/cio/device_id.c @@ -214,7 +214,7 @@ ccw_device_check_sense_id(struct ccw_device *cdev) * sense id information. So, for intervention required, * we use the "whack it until it talks" strategy... */ - CIO_MSG_EVENT(0, "SenseID : device %04x on Subchannel " + CIO_MSG_EVENT(2, "SenseID : device %04x on Subchannel " "0.%x.%04x reports cmd reject\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no); @@ -239,7 +239,7 @@ ccw_device_check_sense_id(struct ccw_device *cdev) lpm = to_io_private(sch)->orb.lpm; if ((lpm & sch->schib.pmcw.pim & sch->schib.pmcw.pam) != 0) - CIO_MSG_EVENT(4, "SenseID : path %02X for device %04x " + CIO_MSG_EVENT(2, "SenseID : path %02X for device %04x " "on subchannel 0.%x.%04x is " "'not operational'\n", lpm, cdev->private->dev_id.devno, diff --git a/trunk/drivers/s390/cio/device_pgid.c b/trunk/drivers/s390/cio/device_pgid.c index ba559053402e..c52449a1f9fc 100644 --- a/trunk/drivers/s390/cio/device_pgid.c +++ b/trunk/drivers/s390/cio/device_pgid.c @@ -79,7 +79,7 @@ __ccw_device_sense_pgid_start(struct ccw_device *cdev) /* ret is 0, -EBUSY, -EACCES or -ENODEV */ if (ret != -EACCES) return ret; - CIO_MSG_EVENT(3, "SNID - Device %04x on Subchannel " + CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel " "0.%x.%04x, lpm %02X, became 'not " "operational'\n", cdev->private->dev_id.devno, @@ -159,7 +159,7 @@ __ccw_device_check_sense_pgid(struct ccw_device *cdev) u8 lpm; lpm = to_io_private(sch)->orb.lpm; - CIO_MSG_EVENT(3, "SNID - Device %04x on Subchannel 0.%x.%04x," + CIO_MSG_EVENT(2, "SNID - Device %04x on Subchannel 0.%x.%04x," " lpm %02X, became 'not operational'\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no, lpm); @@ -275,7 +275,7 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func) return ret; } /* PGID command failed on this path. */ - CIO_MSG_EVENT(3, "SPID - Device %04x on Subchannel " + CIO_MSG_EVENT(2, "SPID - Device %04x on Subchannel " "0.%x.%04x, lpm %02X, became 'not operational'\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no, cdev->private->imask); @@ -317,7 +317,7 @@ static int __ccw_device_do_nop(struct ccw_device *cdev) return ret; } /* nop command failed on this path. */ - CIO_MSG_EVENT(3, "NOP - Device %04x on Subchannel " + CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel " "0.%x.%04x, lpm %02X, became 'not operational'\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no, cdev->private->imask); @@ -362,7 +362,7 @@ __ccw_device_check_pgid(struct ccw_device *cdev) return -EAGAIN; } if (irb->scsw.cc == 3) { - CIO_MSG_EVENT(3, "SPID - Device %04x on Subchannel 0.%x.%04x," + CIO_MSG_EVENT(2, "SPID - Device %04x on Subchannel 0.%x.%04x," " lpm %02X, became 'not operational'\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no, cdev->private->imask); @@ -391,7 +391,7 @@ static int __ccw_device_check_nop(struct ccw_device *cdev) return -ETIME; } if (irb->scsw.cc == 3) { - CIO_MSG_EVENT(3, "NOP - Device %04x on Subchannel 0.%x.%04x," + CIO_MSG_EVENT(2, "NOP - Device %04x on Subchannel 0.%x.%04x," " lpm %02X, became 'not operational'\n", cdev->private->dev_id.devno, sch->schid.ssid, sch->schid.sch_no, cdev->private->imask); diff --git a/trunk/drivers/s390/s390mach.c b/trunk/drivers/s390/s390mach.c index 5080f343ad74..4d4b54277c43 100644 --- a/trunk/drivers/s390/s390mach.c +++ b/trunk/drivers/s390/s390mach.c @@ -48,11 +48,10 @@ s390_collect_crw_info(void *param) int ccode; struct semaphore *sem; unsigned int chain; - int ignore; sem = (struct semaphore *)param; repeat: - ignore = down_interruptible(sem); + down_interruptible(sem); chain = 0; while (1) { if (unlikely(chain > 1)) { diff --git a/trunk/drivers/sbus/char/bpp.c b/trunk/drivers/sbus/char/bpp.c index b87037ec9805..4fab0c23814c 100644 --- a/trunk/drivers/sbus/char/bpp.c +++ b/trunk/drivers/sbus/char/bpp.c @@ -41,7 +41,7 @@ #define BPP_DELAY 100 static const unsigned BPP_MAJOR = LP_MAJOR; -static const char *bpp_dev_name = "bpp"; +static const char* dev_name = "bpp"; /* When switching from compatibility to a mode where I can read, try the following mode first. */ diff --git a/trunk/drivers/scsi/dpt_i2o.c b/trunk/drivers/scsi/dpt_i2o.c index 8508816f303d..0fb5bf4c43ac 100644 --- a/trunk/drivers/scsi/dpt_i2o.c +++ b/trunk/drivers/scsi/dpt_i2o.c @@ -1967,6 +1967,45 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg) return rcode; } + +/* + * This routine returns information about the system. This does not effect + * any logic and if the info is wrong - it doesn't matter. + */ + +/* Get all the info we can not get from kernel services */ +static int adpt_system_info(void __user *buffer) +{ + sysInfo_S si; + + memset(&si, 0, sizeof(si)); + + si.osType = OS_LINUX; + si.osMajorVersion = 0; + si.osMinorVersion = 0; + si.osRevision = 0; + si.busType = SI_PCI_BUS; + si.processorFamily = DPTI_sig.dsProcessorFamily; + +#if defined __i386__ + adpt_i386_info(&si); +#elif defined (__ia64__) + adpt_ia64_info(&si); +#elif defined(__sparc__) + adpt_sparc_info(&si); +#elif defined (__alpha__) + adpt_alpha_info(&si); +#else + si.processorType = 0xff ; +#endif + if(copy_to_user(buffer, &si, sizeof(si))){ + printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); + return -EFAULT; + } + + return 0; +} + #if defined __ia64__ static void adpt_ia64_info(sysInfo_S* si) { @@ -1977,6 +2016,7 @@ static void adpt_ia64_info(sysInfo_S* si) } #endif + #if defined __sparc__ static void adpt_sparc_info(sysInfo_S* si) { @@ -1986,6 +2026,7 @@ static void adpt_sparc_info(sysInfo_S* si) si->processorType = PROC_ULTRASPARC; } #endif + #if defined __alpha__ static void adpt_alpha_info(sysInfo_S* si) { @@ -1997,6 +2038,7 @@ static void adpt_alpha_info(sysInfo_S* si) #endif #if defined __i386__ + static void adpt_i386_info(sysInfo_S* si) { // This is all the info we need for now @@ -2017,45 +2059,9 @@ static void adpt_i386_info(sysInfo_S* si) break; } } -#endif - -/* - * This routine returns information about the system. This does not effect - * any logic and if the info is wrong - it doesn't matter. - */ -/* Get all the info we can not get from kernel services */ -static int adpt_system_info(void __user *buffer) -{ - sysInfo_S si; - - memset(&si, 0, sizeof(si)); - - si.osType = OS_LINUX; - si.osMajorVersion = 0; - si.osMinorVersion = 0; - si.osRevision = 0; - si.busType = SI_PCI_BUS; - si.processorFamily = DPTI_sig.dsProcessorFamily; - -#if defined __i386__ - adpt_i386_info(&si); -#elif defined (__ia64__) - adpt_ia64_info(&si); -#elif defined(__sparc__) - adpt_sparc_info(&si); -#elif defined (__alpha__) - adpt_alpha_info(&si); -#else - si.processorType = 0xff ; #endif - if (copy_to_user(buffer, &si, sizeof(si))){ - printk(KERN_WARNING"dpti: Could not copy buffer TO user\n"); - return -EFAULT; - } - return 0; -} static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) diff --git a/trunk/drivers/scsi/dpti.h b/trunk/drivers/scsi/dpti.h index 337746d46043..924cd5a51676 100644 --- a/trunk/drivers/scsi/dpti.h +++ b/trunk/drivers/scsi/dpti.h @@ -316,6 +316,19 @@ static int adpt_close(struct inode *inode, struct file *file); static void adpt_delay(int millisec); #endif +#if defined __ia64__ +static void adpt_ia64_info(sysInfo_S* si); +#endif +#if defined __sparc__ +static void adpt_sparc_info(sysInfo_S* si); +#endif +#if defined __alpha__ +static void adpt_sparc_info(sysInfo_S* si); +#endif +#if defined __i386__ +static void adpt_i386_info(sysInfo_S* si); +#endif + #define PRINT_BUFFER_SIZE 512 #define HBA_FLAGS_DBG_FLAGS_MASK 0xffff0000 // Mask for debug flags diff --git a/trunk/drivers/serial/serial_core.c b/trunk/drivers/serial/serial_core.c index eab032733790..1e2b9d826f69 100644 --- a/trunk/drivers/serial/serial_core.c +++ b/trunk/drivers/serial/serial_core.c @@ -556,7 +556,7 @@ static int uart_chars_in_buffer(struct tty_struct *tty) static void uart_flush_buffer(struct tty_struct *tty) { struct uart_state *state = tty->driver_data; - struct uart_port *port; + struct uart_port *port = state->port; unsigned long flags; /* @@ -568,7 +568,6 @@ static void uart_flush_buffer(struct tty_struct *tty) return; } - port = state->port; pr_debug("uart_flush_buffer(%d) called\n", tty->index); spin_lock_irqsave(&port->lock, flags); diff --git a/trunk/drivers/usb/host/Kconfig b/trunk/drivers/usb/host/Kconfig index 1ef6df395e0c..33b467a8352d 100644 --- a/trunk/drivers/usb/host/Kconfig +++ b/trunk/drivers/usb/host/Kconfig @@ -129,7 +129,7 @@ config USB_ISP1760_PCI config USB_ISP1760_OF bool "Support for the OF platform bus" - depends on USB_ISP1760_HCD && PPC_OF + depends on USB_ISP1760_HCD && OF ---help--- Enables support for the device present on the PowerPC OpenFirmware platform bus. diff --git a/trunk/drivers/usb/serial/iuu_phoenix.c b/trunk/drivers/usb/serial/iuu_phoenix.c index a01e987c7d32..8a217648b250 100644 --- a/trunk/drivers/usb/serial/iuu_phoenix.c +++ b/trunk/drivers/usb/serial/iuu_phoenix.c @@ -643,7 +643,7 @@ static void read_buf_callback(struct urb *urb) static int iuu_bulk_write(struct usb_serial_port *port) { struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; int result; int i; char *buf_ptr = port->write_urb->transfer_buffer; @@ -694,7 +694,7 @@ static void iuu_uart_read_callback(struct urb *urb) { struct usb_serial_port *port = urb->context; struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; int status; int error = 0; int len = 0; @@ -759,7 +759,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf, int count) { struct iuu_private *priv = usb_get_serial_port_data(port); - unsigned long flags; + unsigned int flags; dbg("%s - enter", __func__); if (count > 256) diff --git a/trunk/drivers/video/bw2.c b/trunk/drivers/video/bw2.c index 79f85dc402d6..275d9dab0c61 100644 --- a/trunk/drivers/video/bw2.c +++ b/trunk/drivers/video/bw2.c @@ -329,7 +329,7 @@ static int __devinit bw2_probe(struct of_device *op, const struct of_device_id * if (!info->screen_base) goto out_unmap_regs; - bw2_blank(FB_BLANK_UNBLANK, info); + bw2_blank(0, info); bw2_init_fix(info, linebytes); diff --git a/trunk/drivers/video/cg3.c b/trunk/drivers/video/cg3.c index e31e26a6bb79..010ea53978f8 100644 --- a/trunk/drivers/video/cg3.c +++ b/trunk/drivers/video/cg3.c @@ -398,7 +398,7 @@ static int __devinit cg3_probe(struct of_device *op, if (!info->screen_base) goto out_unmap_regs; - cg3_blank(FB_BLANK_UNBLANK, info); + cg3_blank(0, info); if (!of_find_property(dp, "width", NULL)) { err = cg3_do_default_mode(par); diff --git a/trunk/drivers/video/cg6.c b/trunk/drivers/video/cg6.c index 8000bccecdc6..fc90db6da65a 100644 --- a/trunk/drivers/video/cg6.c +++ b/trunk/drivers/video/cg6.c @@ -767,7 +767,7 @@ static int __devinit cg6_probe(struct of_device *op, cg6_bt_init(par); cg6_chip_init(info); - cg6_blank(FB_BLANK_UNBLANK, info); + cg6_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_regs; diff --git a/trunk/drivers/video/ffb.c b/trunk/drivers/video/ffb.c index 0f42a696d176..93dca3e2aa50 100644 --- a/trunk/drivers/video/ffb.c +++ b/trunk/drivers/video/ffb.c @@ -987,7 +987,7 @@ static int __devinit ffb_probe(struct of_device *op, * chosen console, it will have video outputs off in * the DAC. */ - ffb_blank(FB_BLANK_UNBLANK, info); + ffb_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_dac; diff --git a/trunk/drivers/video/leo.c b/trunk/drivers/video/leo.c index fb129928d5d5..f3160fc29795 100644 --- a/trunk/drivers/video/leo.c +++ b/trunk/drivers/video/leo.c @@ -601,7 +601,7 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id * leo_init_wids(info); leo_init_hw(info); - leo_blank(FB_BLANK_UNBLANK, info); + leo_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_regs; diff --git a/trunk/drivers/video/p9100.c b/trunk/drivers/video/p9100.c index 676ffb06d1c7..c95874fe9076 100644 --- a/trunk/drivers/video/p9100.c +++ b/trunk/drivers/video/p9100.c @@ -295,7 +295,7 @@ static int __devinit p9100_probe(struct of_device *op, const struct of_device_id if (!info->screen_base) goto out_unmap_regs; - p9100_blank(FB_BLANK_UNBLANK, info); + p9100_blank(0, info); if (fb_alloc_cmap(&info->cmap, 256, 0)) goto out_unmap_screen; diff --git a/trunk/drivers/video/tcx.c b/trunk/drivers/video/tcx.c index 44e8c27ed0fc..a71774305772 100644 --- a/trunk/drivers/video/tcx.c +++ b/trunk/drivers/video/tcx.c @@ -84,7 +84,7 @@ struct tcx_tec { struct tcx_thc { u32 thc_rev; - u32 thc_pad0[511]; + u32 thc_pad0[511]; u32 thc_hs; /* hsync timing */ u32 thc_hsdvs; u32 thc_hd; @@ -126,10 +126,10 @@ struct tcx_par { }; /* Reset control plane so that WID is 8-bit plane. */ -static void __tcx_set_control_plane(struct tcx_par *par) +static void __tcx_set_control_plane (struct tcx_par *par) { u32 __iomem *p, *pend; - + if (par->lowdepth) return; @@ -143,8 +143,8 @@ static void __tcx_set_control_plane(struct tcx_par *par) sbus_writel(tmp, p); } } - -static void tcx_reset(struct fb_info *info) + +static void tcx_reset (struct fb_info *info) { struct tcx_par *par = (struct tcx_par *) info->par; unsigned long flags; @@ -365,8 +365,7 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info, info->screen_base, par->fbsize); } -static int __devinit tcx_probe(struct of_device *op, - const struct of_device_id *match) +static int __devinit tcx_init_one(struct of_device *op) { struct device_node *dp = op->node; struct fb_info *info; @@ -489,6 +488,13 @@ static int __devinit tcx_probe(struct of_device *op, return err; } +static int __devinit tcx_probe(struct of_device *dev, const struct of_device_id *match) +{ + struct of_device *op = to_of_device(&dev->dev); + + return tcx_init_one(op); +} + static int __devexit tcx_remove(struct of_device *op) { struct fb_info *info = dev_get_drvdata(&op->dev); diff --git a/trunk/fs/pipe.c b/trunk/fs/pipe.c index ec228bc9f882..3499f9ff6316 100644 --- a/trunk/fs/pipe.c +++ b/trunk/fs/pipe.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -1087,11 +1086,8 @@ asmlinkage long __weak sys_pipe(int __user *fildes) error = do_pipe(fd); if (!error) { - if (copy_to_user(fildes, fd, sizeof(fd))) { - sys_close(fd[0]); - sys_close(fd[1]); + if (copy_to_user(fildes, fd, sizeof(fd))) error = -EFAULT; - } } return error; } diff --git a/trunk/fs/udf/namei.c b/trunk/fs/udf/namei.c index d3231947db19..2b34c8ca6c83 100644 --- a/trunk/fs/udf/namei.c +++ b/trunk/fs/udf/namei.c @@ -32,7 +32,6 @@ #include #include #include -#include static inline int udf_match(int len1, const char *name1, int len2, const char *name2) @@ -159,8 +158,6 @@ static struct fileIdentDesc *udf_find_entry(struct inode *dir, sector_t offset; struct extent_position epos = {}; struct udf_inode_info *dinfo = UDF_I(dir); - int isdotdot = dentry->d_name.len == 2 && - dentry->d_name.name[0] == '.' && dentry->d_name.name[1] == '.'; size = udf_ext0_offset(dir) + dir->i_size; f_pos = udf_ext0_offset(dir); @@ -228,12 +225,6 @@ static struct fileIdentDesc *udf_find_entry(struct inode *dir, continue; } - if ((cfi->fileCharacteristics & FID_FILE_CHAR_PARENT) && - isdotdot) { - brelse(epos.bh); - return fi; - } - if (!lfi) continue; @@ -295,8 +286,9 @@ static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry, } } unlock_kernel(); + d_add(dentry, inode); - return d_splice_alias(inode, dentry); + return NULL; } static struct fileIdentDesc *udf_add_entry(struct inode *dir, @@ -315,7 +307,7 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, uint16_t liu; int block; kernel_lb_addr eloc; - uint32_t elen = 0; + uint32_t elen; sector_t offset; struct extent_position epos = {}; struct udf_inode_info *dinfo; @@ -406,8 +398,7 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, } add: - /* Is there any extent whose size we need to round up? */ - if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB && elen) { + if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) epos.offset -= sizeof(short_ad); @@ -1241,134 +1232,6 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, return retval; } -static struct dentry *udf_get_parent(struct dentry *child) -{ - struct dentry *parent; - struct inode *inode = NULL; - struct dentry dotdot; - struct fileIdentDesc cfi; - struct udf_fileident_bh fibh; - - dotdot.d_name.name = ".."; - dotdot.d_name.len = 2; - - lock_kernel(); - if (!udf_find_entry(child->d_inode, &dotdot, &fibh, &cfi)) - goto out_unlock; - - if (fibh.sbh != fibh.ebh) - brelse(fibh.ebh); - brelse(fibh.sbh); - - inode = udf_iget(child->d_inode->i_sb, - lelb_to_cpu(cfi.icb.extLocation)); - if (!inode) - goto out_unlock; - unlock_kernel(); - - parent = d_alloc_anon(inode); - if (!parent) { - iput(inode); - parent = ERR_PTR(-ENOMEM); - } - - return parent; -out_unlock: - unlock_kernel(); - return ERR_PTR(-EACCES); -} - - -static struct dentry *udf_nfs_get_inode(struct super_block *sb, u32 block, - u16 partref, __u32 generation) -{ - struct inode *inode; - struct dentry *result; - kernel_lb_addr loc; - - if (block == 0) - return ERR_PTR(-ESTALE); - - loc.logicalBlockNum = block; - loc.partitionReferenceNum = partref; - inode = udf_iget(sb, loc); - - if (inode == NULL) - return ERR_PTR(-ENOMEM); - - if (generation && inode->i_generation != generation) { - iput(inode); - return ERR_PTR(-ESTALE); - } - result = d_alloc_anon(inode); - if (!result) { - iput(inode); - return ERR_PTR(-ENOMEM); - } - return result; -} - -static struct dentry *udf_fh_to_dentry(struct super_block *sb, - struct fid *fid, int fh_len, int fh_type) -{ - if ((fh_len != 3 && fh_len != 5) || - (fh_type != FILEID_UDF_WITH_PARENT && - fh_type != FILEID_UDF_WITHOUT_PARENT)) - return NULL; - - return udf_nfs_get_inode(sb, fid->udf.block, fid->udf.partref, - fid->udf.generation); -} - -static struct dentry *udf_fh_to_parent(struct super_block *sb, - struct fid *fid, int fh_len, int fh_type) -{ - if (fh_len != 5 || fh_type != FILEID_UDF_WITH_PARENT) - return NULL; - - return udf_nfs_get_inode(sb, fid->udf.parent_block, - fid->udf.parent_partref, - fid->udf.parent_generation); -} -static int udf_encode_fh(struct dentry *de, __u32 *fh, int *lenp, - int connectable) -{ - int len = *lenp; - struct inode *inode = de->d_inode; - kernel_lb_addr location = UDF_I(inode)->i_location; - struct fid *fid = (struct fid *)fh; - int type = FILEID_UDF_WITHOUT_PARENT; - - if (len < 3 || (connectable && len < 5)) - return 255; - - *lenp = 3; - fid->udf.block = location.logicalBlockNum; - fid->udf.partref = location.partitionReferenceNum; - fid->udf.generation = inode->i_generation; - - if (connectable && !S_ISDIR(inode->i_mode)) { - spin_lock(&de->d_lock); - inode = de->d_parent->d_inode; - location = UDF_I(inode)->i_location; - fid->udf.parent_block = location.logicalBlockNum; - fid->udf.parent_partref = location.partitionReferenceNum; - fid->udf.parent_generation = inode->i_generation; - spin_unlock(&de->d_lock); - *lenp = 5; - type = FILEID_UDF_WITH_PARENT; - } - - return type; -} - -const struct export_operations udf_export_ops = { - .encode_fh = udf_encode_fh, - .fh_to_dentry = udf_fh_to_dentry, - .fh_to_parent = udf_fh_to_parent, - .get_parent = udf_get_parent, -}; - const struct inode_operations udf_dir_inode_operations = { .lookup = udf_lookup, .create = udf_create, diff --git a/trunk/fs/udf/partition.c b/trunk/fs/udf/partition.c index 96dfd207c3d6..63610f026ae1 100644 --- a/trunk/fs/udf/partition.c +++ b/trunk/fs/udf/partition.c @@ -27,8 +27,8 @@ #include #include -uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, - uint16_t partition, uint32_t offset) +inline uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, + uint16_t partition, uint32_t offset) { struct udf_sb_info *sbi = UDF_SB(sb); struct udf_part_map *map; diff --git a/trunk/fs/udf/super.c b/trunk/fs/udf/super.c index 7a5f69be6ac2..9fb18a340fc1 100644 --- a/trunk/fs/udf/super.c +++ b/trunk/fs/udf/super.c @@ -1933,7 +1933,6 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) /* Fill in the rest of the superblock */ sb->s_op = &udf_sb_ops; - sb->s_export_op = &udf_export_ops; sb->dq_op = NULL; sb->s_dirt = 0; sb->s_magic = UDF_SUPER_MAGIC; diff --git a/trunk/fs/udf/udfdecl.h b/trunk/fs/udf/udfdecl.h index 8fa9c2d70911..f3f45d029277 100644 --- a/trunk/fs/udf/udfdecl.h +++ b/trunk/fs/udf/udfdecl.h @@ -73,7 +73,6 @@ struct task_struct; struct buffer_head; struct super_block; -extern const struct export_operations udf_export_ops; extern const struct inode_operations udf_dir_inode_operations; extern const struct file_operations udf_dir_operations; extern const struct inode_operations udf_file_inode_operations; diff --git a/trunk/include/asm-s390/kvm_host.h b/trunk/include/asm-s390/kvm_host.h index 18cbd8a39796..f8204a4f2e02 100644 --- a/trunk/include/asm-s390/kvm_host.h +++ b/trunk/include/asm-s390/kvm_host.h @@ -104,7 +104,6 @@ struct sie_block { struct kvm_vcpu_stat { u32 exit_userspace; - u32 exit_null; u32 exit_external_request; u32 exit_external_interrupt; u32 exit_stop_request; diff --git a/trunk/include/asm-s390/page.h b/trunk/include/asm-s390/page.h index 12fd9c4f0f15..f0f4579eac13 100644 --- a/trunk/include/asm-s390/page.h +++ b/trunk/include/asm-s390/page.h @@ -125,17 +125,6 @@ page_get_storage_key(unsigned long addr) return skey; } -#ifdef CONFIG_PAGE_STATES - -struct page; -void arch_free_page(struct page *page, int order); -void arch_alloc_page(struct page *page, int order); - -#define HAVE_ARCH_FREE_PAGE -#define HAVE_ARCH_ALLOC_PAGE - -#endif - #endif /* !__ASSEMBLY__ */ /* to align the pointer to the (next) page boundary */ diff --git a/trunk/include/asm-s390/ptrace.h b/trunk/include/asm-s390/ptrace.h index d7d4e2eb3e6f..441d7c260857 100644 --- a/trunk/include/asm-s390/ptrace.h +++ b/trunk/include/asm-s390/ptrace.h @@ -471,8 +471,6 @@ struct task_struct; extern void user_enable_single_step(struct task_struct *); extern void user_disable_single_step(struct task_struct *); -#define __ARCH_WANT_COMPAT_SYS_PTRACE - #define user_mode(regs) (((regs)->psw.mask & PSW_MASK_PSTATE) != 0) #define instruction_pointer(regs) ((regs)->psw.addr & PSW_ADDR_INSN) #define regs_return_value(regs)((regs)->gprs[2]) diff --git a/trunk/include/asm-s390/system.h b/trunk/include/asm-s390/system.h index e0d4500d5f95..c819ae25a842 100644 --- a/trunk/include/asm-s390/system.h +++ b/trunk/include/asm-s390/system.h @@ -116,12 +116,6 @@ extern void pfault_fini(void); #define pfault_fini() do { } while (0) #endif /* CONFIG_PFAULT */ -#ifdef CONFIG_PAGE_STATES -extern void cmma_init(void); -#else -static inline void cmma_init(void) { } -#endif - #define finish_arch_switch(prev) do { \ set_fs(current->thread.mm_segment); \ account_vtime(prev); \ diff --git a/trunk/include/linux/exportfs.h b/trunk/include/linux/exportfs.h index f5abd1306638..de8387b7ceb6 100644 --- a/trunk/include/linux/exportfs.h +++ b/trunk/include/linux/exportfs.h @@ -33,19 +33,6 @@ enum fid_type { * 32 bit parent directory inode number. */ FILEID_INO32_GEN_PARENT = 2, - - /* - * 32 bit block number, 16 bit partition reference, - * 16 bit unused, 32 bit generation number. - */ - FILEID_UDF_WITHOUT_PARENT = 0x51, - - /* - * 32 bit block number, 16 bit partition reference, - * 16 bit unused, 32 bit generation number, - * 32 bit parent block number, 32 bit parent generation number - */ - FILEID_UDF_WITH_PARENT = 0x52, }; struct fid { @@ -56,14 +43,6 @@ struct fid { u32 parent_ino; u32 parent_gen; } i32; - struct { - u32 block; - u16 partref; - u16 parent_partref; - u32 generation; - u32 parent_block; - u32 parent_generation; - } udf; __u32 raw[0]; }; }; diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index 86ea9e34e326..8da627d33804 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -1031,9 +1031,11 @@ int current_cpuset_is_being_rebound(void) return task_cs(current) == cpuset_being_rebound; } -static int update_relax_domain_level(struct cpuset *cs, s64 val) +static int update_relax_domain_level(struct cpuset *cs, char *buf) { - if ((int)val < 0) + int val = simple_strtol(buf, NULL, 10); + + if (val < 0) val = -1; if (val != cs->relax_domain_level) { @@ -1278,6 +1280,9 @@ static ssize_t cpuset_common_file_write(struct cgroup *cont, case FILE_MEMLIST: retval = update_nodemask(cs, buffer); break; + case FILE_SCHED_RELAX_DOMAIN_LEVEL: + retval = update_relax_domain_level(cs, buffer); + break; default: retval = -EINVAL; goto out2; @@ -1343,30 +1348,6 @@ static int cpuset_write_u64(struct cgroup *cgrp, struct cftype *cft, u64 val) return retval; } -static int cpuset_write_s64(struct cgroup *cgrp, struct cftype *cft, s64 val) -{ - int retval = 0; - struct cpuset *cs = cgroup_cs(cgrp); - cpuset_filetype_t type = cft->private; - - cgroup_lock(); - - if (cgroup_is_removed(cgrp)) { - cgroup_unlock(); - return -ENODEV; - } - switch (type) { - case FILE_SCHED_RELAX_DOMAIN_LEVEL: - retval = update_relax_domain_level(cs, val); - break; - default: - retval = -EINVAL; - break; - } - cgroup_unlock(); - return retval; -} - /* * These ascii lists should be read in a single call, by using a user * buffer large enough to hold the entire map. If read in smaller @@ -1425,6 +1406,9 @@ static ssize_t cpuset_common_file_read(struct cgroup *cont, case FILE_MEMLIST: s += cpuset_sprintf_memlist(s, cs); break; + case FILE_SCHED_RELAX_DOMAIN_LEVEL: + s += sprintf(s, "%d", cs->relax_domain_level); + break; default: retval = -EINVAL; goto out; @@ -1465,18 +1449,6 @@ static u64 cpuset_read_u64(struct cgroup *cont, struct cftype *cft) } } -static s64 cpuset_read_s64(struct cgroup *cont, struct cftype *cft) -{ - struct cpuset *cs = cgroup_cs(cont); - cpuset_filetype_t type = cft->private; - switch (type) { - case FILE_SCHED_RELAX_DOMAIN_LEVEL: - return cs->relax_domain_level; - default: - BUG(); - } -} - /* * for the common functions, 'private' gives the type of file @@ -1527,8 +1499,8 @@ static struct cftype files[] = { { .name = "sched_relax_domain_level", - .read_s64 = cpuset_read_s64, - .write_s64 = cpuset_write_s64, + .read_u64 = cpuset_read_u64, + .write_u64 = cpuset_write_u64, .private = FILE_SCHED_RELAX_DOMAIN_LEVEL, }, diff --git a/trunk/mm/slub.c b/trunk/mm/slub.c index a505a828ef41..d379b782fc83 100644 --- a/trunk/mm/slub.c +++ b/trunk/mm/slub.c @@ -3762,7 +3762,7 @@ static int any_slab_objects(struct kmem_cache *s) if (!n) continue; - if (atomic_long_read(&n->total_objects)) + if (atomic_read(&n->total_objects)) return 1; } return 0; diff --git a/trunk/net/mac80211/rc80211_pid_debugfs.c b/trunk/net/mac80211/rc80211_pid_debugfs.c index ff5c380f3c13..ae75d4178739 100644 --- a/trunk/net/mac80211/rc80211_pid_debugfs.c +++ b/trunk/net/mac80211/rc80211_pid_debugfs.c @@ -85,7 +85,7 @@ static int rate_control_pid_events_open(struct inode *inode, struct file *file) struct rc_pid_sta_info *sinfo = inode->i_private; struct rc_pid_event_buffer *events = &sinfo->events; struct rc_pid_events_file_info *file_info; - unsigned long status; + unsigned int status; /* Allocate a state struct */ file_info = kmalloc(sizeof(*file_info), GFP_KERNEL); @@ -135,7 +135,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf, char pb[RC_PID_PRINT_BUF_SIZE]; int ret; int p; - unsigned long status; + unsigned int status; /* Check if there is something to read. */ if (events->next_entry == file_info->next_entry) { diff --git a/trunk/sound/oss/kahlua.c b/trunk/sound/oss/kahlua.c index eb9bc365530d..dfe670f12e67 100644 --- a/trunk/sound/oss/kahlua.c +++ b/trunk/sound/oss/kahlua.c @@ -67,7 +67,7 @@ static int __devinit probe_one(struct pci_dev *pdev, const struct pci_device_id return 1; mem = ioremap(base, 128); - if (!mem) + if(mem == 0UL) return 1; map = readw(mem + 0x18); /* Read the SMI enables */ iounmap(mem);