Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>
Sun, 8 May 2005 12:23:54 +0000 (13:23 +0100)
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>
Sun, 8 May 2005 12:23:54 +0000 (13:23 +0100)
48 files changed:
Makefile
arch/i386/kernel/acpi/boot.c
arch/ppc/Kconfig
arch/ppc64/Kconfig
arch/ppc64/kernel/pSeries_smp.c
arch/ppc64/kernel/xics.c
arch/um/include/user_util.h
arch/um/kernel/Makefile
arch/um/kernel/process_kern.c
arch/um/kernel/ptrace.c
arch/um/kernel/skas/include/mode_kern-skas.h
arch/um/kernel/skas/include/uaccess-skas.h
arch/um/kernel/skas/process.c
arch/um/kernel/skas/process_kern.c
arch/um/kernel/skas/uaccess.c
arch/um/kernel/syscall_kern.c
arch/um/kernel/trap_kern.c
arch/um/kernel/tt/include/mode_kern-tt.h
arch/um/kernel/tt/include/uaccess-tt.h
arch/um/kernel/tt/mem.c
arch/um/kernel/tt/process_kern.c
arch/um/kernel/tt/syscall_user.c
arch/um/kernel/um_arch.c
arch/um/sys-i386/ptrace.c
arch/um/sys-ppc/ptrace.c
arch/um/sys-x86_64/ptrace.c
arch/um/sys-x86_64/signal.c
arch/um/sys-x86_64/syscalls.c
drivers/block/rd.c
drivers/media/video/tuner-core.c
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_def.h
drivers/scsi/aacraid/linit.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/scsi.c
drivers/scsi/scsi_transport_spi.c
drivers/scsi/sr_ioctl.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/serial/8250_pci.c
fs/partitions/msdos.c
include/asm-ppc64/xics.h
include/asm-um/elf.h
include/asm-um/setup.h
sound/pci/via82xx.c

index f7eb55878f11575281add2a5726e483aed5e45bb..bddcb861b49bbb90bc5646a7da5c55833f4689b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 12
-EXTRAVERSION =-rc3
+EXTRAVERSION =-rc4
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
index 53eb5cfd5b630b614952ba31a08e384abb8a2f1a..848bb97af7ca316755f6e47e612ecc75717fb197 100644 (file)
@@ -650,7 +650,7 @@ acpi_find_rsdp (void)
         */
        rsdp_phys = acpi_scan_rsdp (0, 0x400);
        if (!rsdp_phys)
-               rsdp_phys = acpi_scan_rsdp (0xE0000, 0xFFFFF);
+               rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
 
        return rsdp_phys;
 }
index d0d94e56b90b9ec8ab65c4780c4b0804663482af..600f23d7fd33aae9e5115875ada43a289e075b5d 100644 (file)
@@ -77,9 +77,11 @@ config 44x
        bool "44x"
 
 config POWER3
+       select PPC_FPU
        bool "POWER3"
 
 config POWER4
+       select PPC_FPU
        bool "POWER4 and 970 (G5)"
 
 config 8xx
index 257ff66d83cf1e3653e0683deb9132b84be77466..5cb343883e4d88649f8e8eaad39c67e856027d1e 100644 (file)
@@ -262,6 +262,7 @@ config PPC_RTAS
 config RTAS_PROC
        bool "Proc interface to RTAS"
        depends on PPC_RTAS
+       default y
 
 config RTAS_FLASH
        tristate "Firmware flash interface"
index c60d8cb2b84d21d57c46b6f07fed038c39da2d1c..fbad349ec58c2179fce3731d9ead5b8739cbc8c8 100644 (file)
@@ -326,13 +326,6 @@ static void __devinit smp_xics_setup_cpu(int cpu)
 
        cpu_clear(cpu, of_spin_map);
 
-       /*
-        * Put the calling processor into the GIQ.  This is really only
-        * necessary from a secondary thread as the OF start-cpu interface
-        * performs this function for us on primary threads.
-        */
-       rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
-               (1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
 }
 
 static DEFINE_SPINLOCK(timebase_lock);
index eedd1d3c2a10a30891278b1fd7b51faf1a5743d3..879f39b90a337df2b63a88d5399fcf4971da36e7 100644 (file)
@@ -432,6 +432,7 @@ void xics_cause_IPI(int cpu)
 {
        ops->qirr_info(cpu, IPI_PRIORITY);
 }
+#endif /* CONFIG_SMP */
 
 void xics_setup_cpu(void)
 {
@@ -439,9 +440,17 @@ void xics_setup_cpu(void)
 
        ops->cppr_info(cpu, 0xff);
        iosync();
-}
 
-#endif /* CONFIG_SMP */
+       /*
+        * Put the calling processor into the GIQ.  This is really only
+        * necessary from a secondary thread as the OF start-cpu interface
+        * performs this function for us on primary threads.
+        *
+        * XXX: undo of teardown on kexec needs this too, as may hotplug
+        */
+       rtas_set_indicator(GLOBAL_INTERRUPT_QUEUE,
+               (1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
+}
 
 void xics_init_IRQ(void)
 {
@@ -563,8 +572,7 @@ nextnode:
        for (; i < NR_IRQS; ++i)
                get_irq_desc(i)->handler = &xics_pic;
 
-       ops->cppr_info(boot_cpuid, 0xff);
-       iosync();
+       xics_setup_cpu();
 
        ppc64_boot_msg(0x21, "XICS Done");
 }
index 103cd320386cfe56c2b15a6079e6d0bf93cd177e..b8c5b8a952509395c790845e072714093f2655f7 100644 (file)
@@ -67,7 +67,6 @@ extern void *um_kmalloc(int size);
 extern int switcheroo(int fd, int prot, void *from, void *to, int size);
 extern void setup_machinename(char *machine_out);
 extern void setup_hostinfo(void);
-extern void add_arg(char *arg);
 extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
 extern void init_new_thread_signals(int altstack);
 extern void do_exec(int old_pid, int new_pid);
index dca654263857c4641874ace7bc4b853908708868..9736ca27c5f0782edfc34f18d830c03977fb9d65 100644 (file)
@@ -23,14 +23,10 @@ obj-$(CONFIG_SYSCALL_DEBUG) += syscall_user.o
 obj-$(CONFIG_MODE_TT) += tt/
 obj-$(CONFIG_MODE_SKAS) += skas/
 
-# This needs be compiled with frame pointers regardless of how the rest of the
-# kernel is built.
-CFLAGS_frame.o := -fno-omit-frame-pointer
-
 user-objs-$(CONFIG_TTY_LOG) += tty_log.o
 
 USER_OBJS := $(user-objs-y) config.o helper.o main.o process.o tempfile.o \
-       time.o tty_log.o umid.o user_util.o frame.o
+       time.o tty_log.o umid.o user_util.o
 
 include arch/um/scripts/Makefile.rules
 
index 7a943696f9507b64230c3528c4ccfddb77795227..c1adf7ba3fd16aaece7fc79a4b7afde720786316 100644 (file)
@@ -115,16 +115,6 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
        return(pid);
 }
 
-void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
-              struct task_struct *tsk)
-{
-       int cpu = smp_processor_id();
-
-       if (prev != next) 
-               cpu_clear(cpu, prev->cpu_vm_mask);
-       cpu_set(cpu, next->cpu_vm_mask);
-}
-
 void set_current(void *t)
 {
        struct task_struct *task = t;
@@ -152,7 +142,6 @@ void release_thread(struct task_struct *task)
  
 void exit_thread(void)
 {
-       CHOOSE_MODE(exit_thread_tt(), exit_thread_skas());
        unprotect_stack((unsigned long) current_thread);
 }
  
@@ -476,12 +465,21 @@ int singlestepping(void * t)
        return 2;
 }
 
+/*
+ * Only x86 and x86_64 have an arch_align_stack().
+ * All other arches have "#define arch_align_stack(x) (x)"
+ * in their asm/system.h
+ * As this is included in UML from asm-um/system-generic.h,
+ * we can use it to behave as the subarch does.
+ */
+#ifndef arch_align_stack
 unsigned long arch_align_stack(unsigned long sp)
 {
        if (randomize_va_space)
                sp -= get_random_int() % 8192;
        return sp & ~0xf;
 }
+#endif
 
 
 /*
index 3efa59a941a44dcbb0e8cd70781115a805164267..2b75d8d9ba738f493289aa86c045ea3cd07fdc71 100644 (file)
 #include "skas_ptrace.h"
 #include "sysdep/ptrace.h"
 
+static inline void set_singlestepping(struct task_struct *child, int on)
+{
+        if (on)
+                child->ptrace |= PT_DTRACE;
+        else
+                child->ptrace &= ~PT_DTRACE;
+        child->thread.singlestep_syscall = 0;
+
+#ifdef SUBARCH_SET_SINGLESTEPPING
+        SUBARCH_SET_SINGLESTEPPING(child, on)
+#endif
+                }
+
 /*
  * Called by kernel/ptrace.c when detaching..
  */
 void ptrace_disable(struct task_struct *child)
 { 
-       child->ptrace &= ~PT_DTRACE;
-       child->thread.singlestep_syscall = 0;
+        set_singlestepping(child,0);
 }
 
+extern int peek_user(struct task_struct * child, long addr, long data);
+extern int poke_user(struct task_struct * child, long addr, long data);
+
 long sys_ptrace(long request, long pid, long addr, long data)
 {
        struct task_struct *child;
@@ -67,6 +82,10 @@ long sys_ptrace(long request, long pid, long addr, long data)
                goto out_tsk;
        }
 
+#ifdef SUBACH_PTRACE_SPECIAL
+        SUBARCH_PTRACE_SPECIAL(child,request,addr,data)
+#endif
+
        ret = ptrace_check_attach(child, request == PTRACE_KILL);
        if (ret < 0)
                goto out_tsk;
@@ -87,28 +106,9 @@ long sys_ptrace(long request, long pid, long addr, long data)
        }
 
        /* read the word at location addr in the USER area. */
-       case PTRACE_PEEKUSR: {
-               unsigned long tmp;
-
-               ret = -EIO;
-               if ((addr & 3) || addr < 0) 
-                       break;
-
-               tmp = 0;  /* Default return condition */
-               if(addr < MAX_REG_OFFSET){
-                       tmp = getreg(child, addr);
-               }
-#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
-               else if((addr >= offsetof(struct user, u_debugreg[0])) &&
-                       (addr <= offsetof(struct user, u_debugreg[7]))){
-                       addr -= offsetof(struct user, u_debugreg[0]);
-                       addr = addr >> 2;
-                       tmp = child->thread.arch.debugregs[addr];
-               }
-#endif
-               ret = put_user(tmp, (unsigned long __user *) data);
-               break;
-       }
+        case PTRACE_PEEKUSR:
+                ret = peek_user(child, addr, data);
+                break;
 
        /* when I and D space are separate, this will have to be fixed. */
        case PTRACE_POKETEXT: /* write the word at location addr. */
@@ -121,26 +121,8 @@ long sys_ptrace(long request, long pid, long addr, long data)
                break;
 
        case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
-               ret = -EIO;
-               if ((addr & 3) || addr < 0)
-                       break;
-
-               if (addr < MAX_REG_OFFSET) {
-                       ret = putreg(child, addr, data);
-                       break;
-               }
-#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
-               else if((addr >= offsetof(struct user, u_debugreg[0])) &&
-                       (addr <= offsetof(struct user, u_debugreg[7]))){
-                         addr -= offsetof(struct user, u_debugreg[0]);
-                         addr = addr >> 2;
-                         if((addr == 4) || (addr == 5)) break;
-                         child->thread.arch.debugregs[addr] = data;
-                         ret = 0;
-               }
-#endif
-
-               break;
+                ret = poke_user(child, addr, data);
+                break;
 
        case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
        case PTRACE_CONT: { /* restart after signal. */
@@ -148,8 +130,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
                if (!valid_signal(data))
                        break;
 
-               child->ptrace &= ~PT_DTRACE;
-               child->thread.singlestep_syscall = 0;
+                set_singlestepping(child, 0);
                if (request == PTRACE_SYSCALL) {
                        set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
                }
@@ -172,8 +153,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
                if (child->exit_state == EXIT_ZOMBIE)   /* already dead */
                        break;
 
-               child->ptrace &= ~PT_DTRACE;
-               child->thread.singlestep_syscall = 0;
+                set_singlestepping(child, 0);
                child->exit_code = SIGKILL;
                wake_up_process(child);
                break;
@@ -184,8 +164,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
                if (!valid_signal(data))
                        break;
                clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
-               child->ptrace |= PT_DTRACE;
-               child->thread.singlestep_syscall = 0;
+                set_singlestepping(child, 1);
                child->exit_code = data;
                /* give it a chance to run. */
                wake_up_process(child);
index 94c564962378d6f241c3af8892014edbdb5fa5ae..e48490028111ba7d260707c273242e4579cac349 100644 (file)
@@ -18,7 +18,6 @@ extern int copy_thread_skas(int nr, unsigned long clone_flags,
                            unsigned long sp, unsigned long stack_top,
                            struct task_struct *p, struct pt_regs *regs);
 extern void release_thread_skas(struct task_struct *task);
-extern void exit_thread_skas(void);
 extern void initial_thread_cb_skas(void (*proc)(void *), void *arg);
 extern void init_idle_skas(void);
 extern void flush_tlb_kernel_range_skas(unsigned long start,
index c35620385da0b057f4efa1f9eebb21c1f9cd5b0a..cd6c280482cb271bef3e5975e6e385fae7fc4dd0 100644 (file)
@@ -18,8 +18,8 @@
          ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
          ((unsigned long) (addr) + (size) >= (unsigned long)(addr))))
 
-static inline int __deprecated verify_area_skas(int type, const void * addr,
-                                  unsigned long size)
+static inline int verify_area_skas(int type, const void * addr,
+                                   unsigned long size)
 {
        return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
 }
index 4dc13bc8cfd8faf87d499f2a9dfca050327905c6..773cd2b525fc6e45ea58ce891a56f39360dd3355 100644 (file)
@@ -201,6 +201,11 @@ void userspace(union uml_pt_regs *regs)
                }
        }
 }
+#define INIT_JMP_NEW_THREAD 0
+#define INIT_JMP_REMOVE_SIGSTACK 1
+#define INIT_JMP_CALLBACK 2
+#define INIT_JMP_HALT 3
+#define INIT_JMP_REBOOT 4
 
 void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr,
                void (*handler)(int))
@@ -236,7 +241,7 @@ void thread_wait(void *sw, void *fb)
        *switch_buf = &buf;
        fork_buf = fb;
        if(sigsetjmp(buf, 1) == 0)
-               siglongjmp(*fork_buf, 1);
+               siglongjmp(*fork_buf, INIT_JMP_REMOVE_SIGSTACK);
 }
 
 void switch_threads(void *me, void *next)
@@ -266,21 +271,25 @@ int start_idle_thread(void *stack, void *switch_buf_ptr, void **fork_buf_ptr)
 
        *fork_buf_ptr = &initial_jmpbuf;
        n = sigsetjmp(initial_jmpbuf, 1);
-       if(n == 0)
-               new_thread_proc((void *) stack, new_thread_handler);
-       else if(n == 1)
-               remove_sigstack();
-       else if(n == 2){
+        switch(n){
+        case INIT_JMP_NEW_THREAD:
+                new_thread_proc((void *) stack, new_thread_handler);
+                break;
+        case INIT_JMP_REMOVE_SIGSTACK:
+                remove_sigstack();
+                break;
+        case INIT_JMP_CALLBACK:
                (*cb_proc)(cb_arg);
                siglongjmp(*cb_back, 1);
-       }
-       else if(n == 3){
+                break;
+        case INIT_JMP_HALT:
                kmalloc_ok = 0;
                return(0);
-       }
-       else if(n == 4){
+        case INIT_JMP_REBOOT:
                kmalloc_ok = 0;
                return(1);
+        default:
+                panic("Bad sigsetjmp return in start_idle_thread - %d\n", n);
        }
        siglongjmp(**switch_buf, 1);
 }
@@ -305,7 +314,7 @@ void initial_thread_cb_skas(void (*proc)(void *), void *arg)
 
        block_signals();
        if(sigsetjmp(here, 1) == 0)
-               siglongjmp(initial_jmpbuf, 2);
+               siglongjmp(initial_jmpbuf, INIT_JMP_CALLBACK);
        unblock_signals();
 
        cb_proc = NULL;
@@ -316,13 +325,13 @@ void initial_thread_cb_skas(void (*proc)(void *), void *arg)
 void halt_skas(void)
 {
        block_signals();
-       siglongjmp(initial_jmpbuf, 3);
+       siglongjmp(initial_jmpbuf, INIT_JMP_HALT);
 }
 
 void reboot_skas(void)
 {
        block_signals();
-       siglongjmp(initial_jmpbuf, 4);
+       siglongjmp(initial_jmpbuf, INIT_JMP_REBOOT);
 }
 
 void switch_mm_skas(int mm_fd)
index 5d096ea63b97a696be392daa08d92536a6375c9c..ab5d3271da0b08229a01964428a4d033fdd0604c 100644 (file)
@@ -83,10 +83,6 @@ void release_thread_skas(struct task_struct *task)
 {
 }
 
-void exit_thread_skas(void)
-{
-}
-
 void fork_handler(int sig)
 {
         change_sig(SIGUSR1, 1);
index f7da9d027672d1de660dca3c22695db536ca7524..75195281081e10252e840ea2bf533e3cd193a27d 100644 (file)
@@ -29,9 +29,12 @@ static unsigned long maybe_map(unsigned long virt, int is_write)
        if(IS_ERR(phys) || (is_write && !pte_write(pte))){
                err = handle_page_fault(virt, 0, is_write, 1, &dummy_code);
                if(err)
-                       return(0);
+                       return(-1UL);
                phys = um_virt_to_phys(current, virt, NULL);
        }
+        if(IS_ERR(phys))
+                phys = (void *) -1;
+
        return((unsigned long) phys);
 }
 
@@ -42,7 +45,7 @@ static int do_op(unsigned long addr, int len, int is_write,
        int n;
 
        addr = maybe_map(addr, is_write);
-       if(addr == -1)
+       if(addr == -1UL)
                return(-1);
 
        page = phys_to_page(addr);
index 42731e04f50fda4fdfed91a5142af3ef7019a527..b7a55251e89727d44cf7ba841b309091034edcdb 100644 (file)
@@ -17,7 +17,6 @@
 #include "linux/utime.h"
 #include "asm/mman.h"
 #include "asm/uaccess.h"
-#include "asm/ipc.h"
 #include "kern_util.h"
 #include "user_util.h"
 #include "sysdep/syscalls.h"
index 54e2ec33a43c028f517dd7eda1b53d270c790d49..5fca2c61eb980a631fe70d500b18b9422e17e0cf 100644 (file)
@@ -48,7 +48,7 @@ int handle_page_fault(unsigned long address, unsigned long ip,
                goto good_area;
        else if(!(vma->vm_flags & VM_GROWSDOWN)) 
                goto out;
-       else if(!ARCH_IS_STACKGROW(address))
+       else if(is_user && !ARCH_IS_STACKGROW(address))
                goto out;
        else if(expand_stack(vma, address)) 
                goto out;
index 28aaab3448fa9033f7d7589be52a74b64b25bf94..e0ca0e0b251644f9a9fd30af8d2a5f7299077e9e 100644 (file)
@@ -19,7 +19,6 @@ extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp,
                          unsigned long stack_top, struct task_struct *p,
                          struct pt_regs *regs);
 extern void release_thread_tt(struct task_struct *task);
-extern void exit_thread_tt(void);
 extern void initial_thread_cb_tt(void (*proc)(void *), void *arg);
 extern void init_idle_tt(void);
 extern void flush_tlb_kernel_range_tt(unsigned long start, unsigned long end);
index bb69d6b7d0227cdf82bd548baa0e1124a2368bca..3fbb5fe26f490507b455407a9dba55be5d41c040 100644 (file)
@@ -33,8 +33,8 @@ extern unsigned long uml_physmem;
          (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \
           (under_task_size(addr, size) || is_stack(addr, size))))
 
-static inline int __deprecated verify_area_tt(int type, const void * addr,
-                                unsigned long size)
+static inline int verify_area_tt(int type, const void * addr,
+                                 unsigned long size)
 {
        return(access_ok_tt(type, addr, size) ? 0 : -EFAULT);
 }
index 74346a04a2b287f5ecb3a8d86ac97f3c7e2ad0ab..bcb8796c3cb15386e03d424109807ac1bca31e1e 100644 (file)
@@ -21,14 +21,8 @@ void before_mem_tt(unsigned long brk_start)
        remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1);
 }
 
-#ifdef CONFIG_HOST_2G_2G
-#define TOP 0x80000000
-#else
-#define TOP 0xc0000000
-#endif
-
 #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
-#define START (TOP - SIZE)
+#define START (CONFIG_TOP_ADDR - SIZE)
 
 unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, 
                                unsigned long *task_size_out)
index f19f7c18febe4a3257d4c6f30113337d4a1c1ba0..df810ca8fc1204a1c48c1c05e6f3c93d945fbb9c 100644 (file)
@@ -65,8 +65,7 @@ void *switch_to_tt(void *prev, void *next, void *last)
                panic("write of switch_pipe failed, err = %d", -err);
 
        reading = 1;
-       if((from->exit_state == EXIT_ZOMBIE) ||
-          (from->exit_state == EXIT_DEAD))
+        if(from->thread.mode.tt.switch_pipe[0] == -1)
                os_kill_process(os_getpid(), 0);
 
        err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c));
@@ -81,8 +80,7 @@ void *switch_to_tt(void *prev, void *next, void *last)
         * in case it has not already killed itself.
         */
        prev_sched = current->thread.prev_sched;
-       if((prev_sched->exit_state == EXIT_ZOMBIE) ||
-          (prev_sched->exit_state == EXIT_DEAD))
+        if(prev_sched->thread.mode.tt.switch_pipe[0] == -1)
                os_kill_process(prev_sched->thread.mode.tt.extern_pid, 1);
 
        change_sig(SIGVTALRM, vtalrm);
@@ -101,14 +99,18 @@ void release_thread_tt(struct task_struct *task)
 {
        int pid = task->thread.mode.tt.extern_pid;
 
+       /*
+         * We first have to kill the other process, before
+         * closing its switch_pipe. Else it might wake up
+         * and receive "EOF" before we could kill it.
+         */
        if(os_getpid() != pid)
                os_kill_process(pid, 0);
-}
 
-void exit_thread_tt(void)
-{
-       os_close_file(current->thread.mode.tt.switch_pipe[0]);
-       os_close_file(current->thread.mode.tt.switch_pipe[1]);
+        os_close_file(task->thread.mode.tt.switch_pipe[0]);
+        os_close_file(task->thread.mode.tt.switch_pipe[1]);
+       /* use switch_pipe as flag: thread is released */
+        task->thread.mode.tt.switch_pipe[0] = -1;
 }
 
 void suspend_new_thread(int fd)
index e4e7e9c2224c9c536a19a0e1947b0ee47558e64b..b218316cfdb29aa169beb82ecdeca42d89a6407f 100644 (file)
@@ -63,6 +63,10 @@ void do_syscall(void *task, int pid, int local_using_sysemu)
 
        UPT_SYSCALL_NR(TASK_REGS(task)) = PT_SYSCALL_NR(proc_regs);
 
+#ifdef UPT_ORIGGPR2
+        UPT_ORIGGPR2(TASK_REGS(task)) = REGS_ORIGGPR2(proc_regs);
+#endif
+
        if(((unsigned long *) PT_IP(proc_regs) >= &_stext) &&
           ((unsigned long *) PT_IP(proc_regs) <= &_etext))
                tracer_panic("I'm tracing myself and I can't get out");
index 5c49d88eed3d0701652dc03bffc80ade97d51201..4d10ec372a678a28124428f128d7b3b822b84d9f 100644 (file)
@@ -23,6 +23,7 @@
 #include "asm/ptrace.h"
 #include "asm/elf.h"
 #include "asm/user.h"
+#include "asm/setup.h"
 #include "ubd_user.h"
 #include "asm/current.h"
 #include "asm/setup.h"
@@ -42,9 +43,9 @@
 #define DEFAULT_COMMAND_LINE "root=98:0"
 
 /* Changed in linux_main and setup_arch, which run before SMP is started */
-char command_line[COMMAND_LINE_SIZE] = { 0 };
+static char command_line[COMMAND_LINE_SIZE] = { 0 };
 
-void add_arg(char *arg)
+static void add_arg(char *arg)
 {
        if (strlen(command_line) + strlen(arg) + 1 > COMMAND_LINE_SIZE) {
                printf("add_arg: Too many command line arguments!\n");
@@ -449,7 +450,7 @@ void __init setup_arch(char **cmdline_p)
 {
        notifier_chain_register(&panic_notifier_list, &panic_exit_notifier);
        paging_init();
-       strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
+        strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
        *cmdline_p = command_line;
        setup_hostinfo();
 }
index e470d28cdf84efbccbd751bea77d6cb1cc573cd4..e839ce65ad287d2bfa172f58d6c2ceaae302e373 100644 (file)
@@ -73,6 +73,25 @@ int putreg(struct task_struct *child, int regno, unsigned long value)
        return 0;
 }
 
+int poke_user(struct task_struct *child, long addr, long data)
+{
+        if ((addr & 3) || addr < 0)
+                return -EIO;
+
+        if (addr < MAX_REG_OFFSET)
+                return putreg(child, addr, data);
+
+        else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+                (addr <= offsetof(struct user, u_debugreg[7]))){
+                addr -= offsetof(struct user, u_debugreg[0]);
+                addr = addr >> 2;
+                if((addr == 4) || (addr == 5)) return -EIO;
+                child->thread.arch.debugregs[addr] = data;
+                return 0;
+        }
+        return -EIO;
+}
+
 unsigned long getreg(struct task_struct *child, int regno)
 {
        unsigned long retval = ~0UL;
@@ -93,6 +112,27 @@ unsigned long getreg(struct task_struct *child, int regno)
        return retval;
 }
 
+int peek_user(struct task_struct *child, long addr, long data)
+{
+/* read the word at location addr in the USER area. */
+        unsigned long tmp;
+
+        if ((addr & 3) || addr < 0)
+                return -EIO;
+
+        tmp = 0;  /* Default return condition */
+        if(addr < MAX_REG_OFFSET){
+                tmp = getreg(child, addr);
+        }
+        else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+                (addr <= offsetof(struct user, u_debugreg[7]))){
+                addr -= offsetof(struct user, u_debugreg[0]);
+                addr = addr >> 2;
+                tmp = child->thread.arch.debugregs[addr];
+        }
+        return put_user(tmp, (unsigned long *) data);
+}
+
 struct i387_fxsave_struct {
        unsigned short  cwd;
        unsigned short  swd;
index a971366d3277a4f8733c113262abf29e2bc6d13f..8e71b47f2b8ed86f9bee12696b773c3e99f011e8 100644 (file)
@@ -8,6 +8,25 @@ int putreg(struct task_struct *child, unsigned long regno,
        return 0;
 }
 
+int poke_user(struct task_struct *child, long addr, long data)
+{
+       if ((addr & 3) || addr < 0)
+               return -EIO;
+
+       if (addr < MAX_REG_OFFSET)
+               return putreg(child, addr, data);
+
+       else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+               (addr <= offsetof(struct user, u_debugreg[7]))){
+                 addr -= offsetof(struct user, u_debugreg[0]);
+                 addr = addr >> 2;
+                 if((addr == 4) || (addr == 5)) return -EIO;
+                 child->thread.arch.debugregs[addr] = data;
+                 return 0;
+       }
+       return -EIO;
+}
+
 unsigned long getreg(struct task_struct *child, unsigned long regno)
 {
        unsigned long retval = ~0UL;
@@ -16,6 +35,27 @@ unsigned long getreg(struct task_struct *child, unsigned long regno)
        return retval;
 }
 
+int peek_user(struct task_struct *child, long addr, long data)
+{
+       /* read the word at location addr in the USER area. */
+       unsigned long tmp;
+
+       if ((addr & 3) || addr < 0)
+               return -EIO;
+
+       tmp = 0;  /* Default return condition */
+       if(addr < MAX_REG_OFFSET){
+               tmp = getreg(child, addr);
+       }
+       else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+               (addr <= offsetof(struct user, u_debugreg[7]))){
+               addr -= offsetof(struct user, u_debugreg[0]);
+               addr = addr >> 2;
+               tmp = child->thread.arch.debugregs[addr];
+       }
+       return put_user(tmp, (unsigned long *) data);
+}
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index 8c146b2a1e00aea210e9b5166b3b6b4753fc8406..b593bb256f2cf96d0b65ee3a76de1a1594b4af18 100644 (file)
@@ -62,6 +62,27 @@ int putreg(struct task_struct *child, int regno, unsigned long value)
        return 0;
 }
 
+int poke_user(struct task_struct *child, long addr, long data)
+{
+        if ((addr & 3) || addr < 0)
+                return -EIO;
+
+        if (addr < MAX_REG_OFFSET)
+                return putreg(child, addr, data);
+
+#if 0 /* Need x86_64 debugregs handling */
+        else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+                (addr <= offsetof(struct user, u_debugreg[7]))){
+                addr -= offsetof(struct user, u_debugreg[0]);
+                addr = addr >> 2;
+                if((addr == 4) || (addr == 5)) return -EIO;
+                child->thread.arch.debugregs[addr] = data;
+                return 0;
+        }
+#endif
+        return -EIO;
+}
+
 unsigned long getreg(struct task_struct *child, int regno)
 {
        unsigned long retval = ~0UL;
@@ -84,6 +105,29 @@ unsigned long getreg(struct task_struct *child, int regno)
        return retval;
 }
 
+int peek_user(struct task_struct *child, long addr, long data)
+{
+       /* read the word at location addr in the USER area. */
+        unsigned long tmp;
+
+        if ((addr & 3) || addr < 0)
+                return -EIO;
+
+        tmp = 0;  /* Default return condition */
+        if(addr < MAX_REG_OFFSET){
+                tmp = getreg(child, addr);
+        }
+#if 0 /* Need x86_64 debugregs handling */
+        else if((addr >= offsetof(struct user, u_debugreg[0])) &&
+                (addr <= offsetof(struct user, u_debugreg[7]))){
+                addr -= offsetof(struct user, u_debugreg[0]);
+                addr = addr >> 2;
+                tmp = child->thread.arch.debugregs[addr];
+        }
+#endif
+        return put_user(tmp, (unsigned long *) data);
+}
+
 void arch_switch(void)
 {
 /* XXX
index b740177066a06d92de743d204cb2a0aa7d47bfae..73a7926f73705d100809adc35b567cb0594cb712 100644 (file)
@@ -168,7 +168,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
 
        frame = (struct rt_sigframe __user *)
                round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8;
-       frame -= 128;
+       ((unsigned char *) frame) -= 128;
 
        if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
                goto out;
index 2a575ef52bba70fd104cbd76488c30772b15ee82..dd9914642b8e905e5744d81cf712d9af9a141a84 100644 (file)
@@ -44,6 +44,8 @@ long sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount)
 #ifdef CONFIG_MODE_SKAS
 extern int userspace_pid[];
 
+#include "skas_ptrace.h"
+
 long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
 {
        struct ptrace_ldt ldt;
index f8a8b68dced013a6d88a5272934a59719b89e461..145c1fbffe0135648992806cf3166fd36fa89832 100644 (file)
@@ -74,7 +74,7 @@ static struct request_queue *rd_queue[CONFIG_BLK_DEV_RAM_COUNT];
  * architecture-specific setup routine (from the stored boot sector
  * information).
  */
-static int rd_size = CONFIG_BLK_DEV_RAM_SIZE;  /* Size of the RAM disks */
+int rd_size = CONFIG_BLK_DEV_RAM_SIZE;         /* Size of the RAM disks */
 /*
  * It would be very desirable to have a soft-blocksize (that in the case
  * of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because
index 881a0539fc1704c04be38a455a87918d1315dd84..6212388edb75b0035b19761eb00bfec503b0a4ce 100644 (file)
@@ -357,8 +357,16 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                    V4L2_TUNER_RADIO != t->mode)
                        set_tv_freq(client,400*16);
                t->mode  = f->type;
-               t->freq  = f->frequency;
-               set_freq(client,t->freq);
+               set_freq(client,f->frequency);
+               break;
+       }
+       case VIDIOC_G_FREQUENCY:
+       {
+               struct v4l2_frequency *f = arg;
+
+               SWITCH_V4L2;
+               f->type = t->mode;
+               f->frequency = t->freq;
                break;
        }
        case VIDIOC_G_TUNER:
@@ -368,6 +376,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                SWITCH_V4L2;
                if (V4L2_TUNER_RADIO == t->mode  &&  t->has_signal)
                        tuner->signal = t->has_signal(client);
+               tuner->rangelow = tv_range[0] * 16;
+               tuner->rangehigh = tv_range[1] * 16;
                break;
        }
        default:
index 1f9aeb4accc60cc80f810125083e860dbf74dc3f..68d151aaa4749f893294d4a04150f57c59b6f509 100644 (file)
@@ -52,7 +52,7 @@ static inline int zfcp_sg_list_copy_from_user(struct zfcp_sg_list *,
 static inline int zfcp_sg_list_copy_to_user(void __user *,
                                            struct zfcp_sg_list *, size_t);
 
-static int zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long);
+static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long);
 
 #define ZFCP_CFDC_IOC_MAGIC                     0xDD
 #define ZFCP_CFDC_IOC \
index 0afa1c4696ca6b5f7ae4c1356ad7b640f8c8b8cc..c5daf372f853d556c83abcf2ad475d65fda581b5 100644 (file)
@@ -61,7 +61,6 @@
 #include <linux/mempool.h>
 #include <linux/syscalls.h>
 #include <linux/ioctl.h>
-#include <linux/ioctl32.h>
 
 /************************ DEBUG FLAGS *****************************************/
 
index c9b82687ba1aa5c59bd3bfd2d5fda40d7d3ea762..242fa77513f5a6e3502d2ae12cf3be65ff82853c 100644 (file)
@@ -450,7 +450,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
                }
        }
 
-       return 0;
+       return err;
 }
 
 /**
index e60f9338e44ad4a2eb938adcc70a491c9a09815d..d978e4a3e973742ca03475584f96e0b39fff0f48 100644 (file)
@@ -2335,8 +2335,6 @@ ahc_linux_free_target(struct ahc_softc *ahc, struct ahc_linux_target *targ)
                      AHC_TRANS_GOAL, /*paused*/FALSE);
        ahc_update_neg_request(ahc, &devinfo, tstate, tinfo, AHC_NEG_ALWAYS);
        ahc->platform_data->targets[target_offset] = NULL;
-       if (targ->inq_data != NULL)
-               free(targ->inq_data, M_DEVBUF);
        free(targ, M_DEVBUF);
 }
 
index c401537067b65c25788cecf6b3c80be88272fc1c..ed9027bd8a40917ed2a8788ac7246e0be10219d5 100644 (file)
@@ -423,10 +423,6 @@ struct ahc_linux_device {
        struct                  ahc_linux_target *target;
 };
 
-typedef enum {
-       AHC_INQ_VALID            = 0x02,
-} ahc_linux_targ_flags;
-
 struct ahc_linux_target {
        struct ahc_linux_device  *devices[AHC_NUM_LUNS];
        int                       channel;
@@ -434,8 +430,6 @@ struct ahc_linux_target {
        int                       refcount;
        struct ahc_transinfo      last_tinfo;
        struct ahc_softc         *ahc;
-       ahc_linux_targ_flags      flags;
-       struct scsi_inquiry_data *inq_data;
 };
 
 /********************* Definitions Required by the Core ***********************/
index 2240a0cde583d6c62279adc35b9b269377aeb4c5..9bc1f153f7eaf833f0aa3d77082b3ac5fc9b5f37 100644 (file)
@@ -300,7 +300,7 @@ qla2x00_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
        rport->dev_loss_tmo = ha->port_down_retry_count + 5;
 }
 
-static struct fc_function_template qla2xxx_transport_functions = {
+struct fc_function_template qla2xxx_transport_functions = {
 
        .show_host_node_name = 1,
        .show_host_port_name = 1,
@@ -322,12 +322,6 @@ static struct fc_function_template qla2xxx_transport_functions = {
 
 };
 
-struct scsi_transport_template *
-qla2x00_alloc_transport_tmpl(void)
-{
-       return (fc_attach_transport(&qla2xxx_transport_functions));
-}
-
 void
 qla2x00_init_host_attr(scsi_qla_host_t *ha)
 {
index e4bfe4d5bbe4b6ed206b7365fdc286a3591a7488..2efec6c24d60f75aff6fb5721a496eabebcecf2c 100644 (file)
@@ -24,7 +24,6 @@
 #define        __QLA_GBL_H
 
 #include <linux/interrupt.h>
-#include <scsi/scsi_transport.h>
 
 extern void qla2x00_remove_one(struct pci_dev *);
 extern int qla2x00_probe_one(struct pci_dev *, struct qla_board_info *);
@@ -248,9 +247,10 @@ extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *);
 /*
  * Global Function Prototypes in qla_attr.c source file.
  */
+struct fc_function_template;
+extern struct fc_function_template qla2xxx_transport_functions;
 extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
-extern struct scsi_transport_template *qla2x00_alloc_transport_tmpl(void);
 extern void qla2x00_init_host_attr(scsi_qla_host_t *);
 extern void qla2x00_alloc_sysfs_attr(scsi_qla_host_t *);
 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *);
index 84db911318c61f095d32f85994521224784c32fa..579448222d691d77bd656a35fa536d58be3ad417 100644 (file)
@@ -2350,7 +2350,8 @@ qla2x00_module_init(void)
 #if DEBUG_QLA2100
        strcat(qla2x00_version_str, "-debug");
 #endif
-       qla2xxx_transport_template = qla2x00_alloc_transport_tmpl();
+       qla2xxx_transport_template =
+           fc_attach_transport(&qla2xxx_transport_functions);
        if (!qla2xxx_transport_template)
                return -ENODEV;
 
index 05d2bd075fd4e27a6f954e2b0662c400733790f9..184bcaeaf8127620cea60423ac35e7a50eaac5b6 100644 (file)
@@ -542,7 +542,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
                 * that the device is no longer present */
                cmd->result = DID_NO_CONNECT << 16;
                atomic_inc(&cmd->device->iorequest_cnt);
-               scsi_done(cmd);
+               __scsi_done(cmd);
                /* return 0 (because the command has been processed) */
                goto out;
        }
index 303d7656f71021fa592ab0924212a03361f9a445..28966d05435cf6506c214ab56b8b92050ab85c81 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/workqueue.h>
+#include <linux/blkdev.h>
 #include <asm/semaphore.h>
 #include <scsi/scsi.h>
 #include "scsi_priv.h"
 
 #define SPI_MAX_ECHO_BUFFER_SIZE       4096
 
+#define DV_LOOPS       3
+#define DV_TIMEOUT     (10*HZ)
+#define DV_RETRIES     3       /* should only need at most 
+                                * two cc/ua clears */
+
 /* Private data accessors (keep these out of the header file) */
 #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending)
 #define spi_dv_sem(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_sem)
@@ -100,6 +106,29 @@ static int sprint_frac(char *dest, int value, int denom)
        return result;
 }
 
+/* Modification of scsi_wait_req that will clear UNIT ATTENTION conditions
+ * resulting from (likely) bus and device resets */
+static void spi_wait_req(struct scsi_request *sreq, const void *cmd,
+                        void *buffer, unsigned bufflen)
+{
+       int i;
+
+       for(i = 0; i < DV_RETRIES; i++) {
+               sreq->sr_request->flags |= REQ_FAILFAST;
+
+               scsi_wait_req(sreq, cmd, buffer, bufflen,
+                             DV_TIMEOUT, /* retries */ 1);
+               if (sreq->sr_result & DRIVER_SENSE) {
+                       struct scsi_sense_hdr sshdr;
+
+                       if (scsi_request_normalize_sense(sreq, &sshdr)
+                           && sshdr.sense_key == UNIT_ATTENTION)
+                               continue;
+               }
+               break;
+       }
+}
+
 static struct {
        enum spi_signal_type    value;
        char                    *name;
@@ -378,11 +407,6 @@ static CLASS_DEVICE_ATTR(signalling, S_IRUGO | S_IWUSR,
        if(i->f->set_##x)               \
                i->f->set_##x(sdev->sdev_target, y)
 
-#define DV_LOOPS       3
-#define DV_TIMEOUT     (10*HZ)
-#define DV_RETRIES     3       /* should only need at most 
-                                * two cc/ua clears */
-
 enum spi_compare_returns {
        SPI_COMPARE_SUCCESS,
        SPI_COMPARE_FAILURE,
@@ -446,8 +470,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
        for (r = 0; r < retries; r++) {
                sreq->sr_cmd_len = 0;   /* wait_req to fill in */
                sreq->sr_data_direction = DMA_TO_DEVICE;
-               scsi_wait_req(sreq, spi_write_buffer, buffer, len,
-                             DV_TIMEOUT, DV_RETRIES);
+               spi_wait_req(sreq, spi_write_buffer, buffer, len);
                if(sreq->sr_result || !scsi_device_online(sdev)) {
                        struct scsi_sense_hdr sshdr;
 
@@ -471,8 +494,7 @@ spi_dv_device_echo_buffer(struct scsi_request *sreq, u8 *buffer,
                memset(ptr, 0, len);
                sreq->sr_cmd_len = 0;   /* wait_req to fill in */
                sreq->sr_data_direction = DMA_FROM_DEVICE;
-               scsi_wait_req(sreq, spi_read_buffer, ptr, len,
-                             DV_TIMEOUT, DV_RETRIES);
+               spi_wait_req(sreq, spi_read_buffer, ptr, len);
                scsi_device_set_state(sdev, SDEV_QUIESCE);
 
                if (memcmp(buffer, ptr, len) != 0)
@@ -500,8 +522,7 @@ spi_dv_device_compare_inquiry(struct scsi_request *sreq, u8 *buffer,
 
                memset(ptr, 0, len);
 
-               scsi_wait_req(sreq, spi_inquiry, ptr, len,
-                             DV_TIMEOUT, DV_RETRIES);
+               spi_wait_req(sreq, spi_inquiry, ptr, len);
                
                if(sreq->sr_result || !scsi_device_online(sdev)) {
                        scsi_device_set_state(sdev, SDEV_QUIESCE);
@@ -593,8 +614,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
         * (reservation conflict, device not ready, etc) just
         * skip the write tests */
        for (l = 0; ; l++) {
-               scsi_wait_req(sreq, spi_test_unit_ready, NULL, 0,
-                             DV_TIMEOUT, DV_RETRIES);
+               spi_wait_req(sreq, spi_test_unit_ready, NULL, 0);
 
                if(sreq->sr_result) {
                        if(l >= 3)
@@ -608,8 +628,7 @@ spi_dv_device_get_echo_buffer(struct scsi_request *sreq, u8 *buffer)
        sreq->sr_cmd_len = 0;
        sreq->sr_data_direction = DMA_FROM_DEVICE;
 
-       scsi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4,
-                     DV_TIMEOUT, DV_RETRIES);
+       spi_wait_req(sreq, spi_read_buffer_descriptor, buffer, 4);
 
        if (sreq->sr_result)
                /* Device has no echo buffer */
index 3471be05779a5220e40eb3e67d32ad3ee7b6bd8e..82d68fdb15484520abd80d1aa603d2395a86ad6b 100644 (file)
@@ -281,6 +281,9 @@ int sr_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
        char *buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd));
        int result;
 
+       if (!buffer)
+               return -ENOMEM;
+
        memset(&cgc, 0, sizeof(struct packet_command));
        cgc.cmd[0] = GPCMD_READ_SUBCHANNEL;
        cgc.cmd[2] = 0x40;      /* I do want the subchannel info */
index 5ff83d214f128eed2ca780cf50fbc8f12a6fa07e..5b07c6ec3eccbc2845216d1fa1c1dce63039739d 100644 (file)
@@ -2038,8 +2038,9 @@ static void sym2_set_period(struct scsi_target *starget, int period)
        struct sym_hcb *np = sym_get_hcb(shost);
        struct sym_tcb *tp = &np->target[starget->id];
 
-       /* have to have DT for these transfers */
-       if (period <= np->minsync)
+       /* have to have DT for these transfers, but DT will also
+        * set width, so check that this is allowed */
+       if (period <= np->minsync && spi_width(starget))
                tp->tgoal.dt = 1;
 
        tp->tgoal.period = period;
index f8d90d0ecfeac2e1a38690cc253b988714d667ef..de54bdc5398b96b6c44b01c881c91a5a1010a296 100644 (file)
@@ -1009,6 +1009,8 @@ get_pci_irq(struct pci_dev *dev, struct pci_board *board, int idx)
  *  n    = number of serial ports
  *  baud = baud rate
  *
+ * This table is sorted by (in order): baud, bt, bn, n.
+ *
  * Please note: in theory if n = 1, _bt infix should make no difference.
  * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
  */
index 17ee1b4ff087ee060a9e13a1a4bbe889c9623f22..584a27b2bbd5a5cfc4317356a28efb3b42ef427f 100644 (file)
@@ -114,9 +114,6 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev,
                 */
                for (i=0; i<4; i++, p++) {
                        u32 offs, size, next;
-
-                       if (SYS_IND(p) == 0)
-                               continue;
                        if (!NR_SECTS(p) || is_extended_partition(p))
                                continue;
 
@@ -433,8 +430,6 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
        for (slot = 1 ; slot <= 4 ; slot++, p++) {
                u32 start = START_SECT(p)*sector_size;
                u32 size = NR_SECTS(p)*sector_size;
-               if (SYS_IND(p) == 0)
-                       continue;
                if (!size)
                        continue;
                if (is_extended_partition(p)) {
index 0027da4364ac5c96a61e1ba86c9a9ea85d627b43..fdec5e7a7af6cd177e324648bbeeb29da3fb8c4a 100644 (file)
@@ -30,7 +30,4 @@ struct xics_ipi_struct {
 
 extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned;
 
-extern unsigned int default_distrib_server;
-extern unsigned int interrupt_server_size;
-
 #endif /* _PPC64_KERNEL_XICS_H */
index ebf7c63886e058a93610b61a27f262a2ebafa532..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
- * Licensed under the GPL
- */
-#ifndef __UM_ELF_I386_H
-#define __UM_ELF_I386_H
-
-#include "user.h"
-
-#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
-
-#define R_386_NONE     0
-#define R_386_32       1
-#define R_386_PC32     2
-#define R_386_GOT32    3
-#define R_386_PLT32    4
-#define R_386_COPY     5
-#define R_386_GLOB_DAT 6
-#define R_386_JMP_SLOT 7
-#define R_386_RELATIVE 8
-#define R_386_GOTOFF   9
-#define R_386_GOTPC    10
-#define R_386_NUM      11
-
-#elif defined(CONFIG_UML_X86) && defined(CONFIG_64BIT)
-
-/* x86-64 relocation types */
-#define R_X86_64_NONE          0       /* No reloc */
-#define R_X86_64_64            1       /* Direct 64 bit  */
-#define R_X86_64_PC32          2       /* PC relative 32 bit signed */
-#define R_X86_64_GOT32         3       /* 32 bit GOT entry */
-#define R_X86_64_PLT32         4       /* 32 bit PLT address */
-#define R_X86_64_COPY          5       /* Copy symbol at runtime */
-#define R_X86_64_GLOB_DAT      6       /* Create GOT entry */
-#define R_X86_64_JUMP_SLOT     7       /* Create PLT entry */
-#define R_X86_64_RELATIVE      8       /* Adjust by program base */
-#define R_X86_64_GOTPCREL      9       /* 32 bit signed pc relative
-                                          offset to GOT */
-#define R_X86_64_32            10      /* Direct 32 bit zero extended */
-#define R_X86_64_32S           11      /* Direct 32 bit sign extended */
-#define R_X86_64_16            12      /* Direct 16 bit zero extended */
-#define R_X86_64_PC16          13      /* 16 bit sign extended pc relative */
-#define R_X86_64_8             14      /* Direct 8 bit sign extended  */
-#define R_X86_64_PC8           15      /* 8 bit sign extended pc relative */
-
-#define R_X86_64_NUM           16
-
-#endif
-
-typedef unsigned long elf_greg_t;
-
-#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
-typedef struct user_i387_struct elf_fpregset_t;
-
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-#define elf_check_arch(x) \
-       (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
-
-#define ELF_CLASS      ELFCLASS32
-#define ELF_DATA        ELFDATA2LSB
-#define ELF_ARCH        EM_386
-
-#define ELF_PLAT_INIT(regs, load_addr) do { \
-       PT_REGS_EBX(regs) = 0; \
-       PT_REGS_ECX(regs) = 0; \
-       PT_REGS_EDX(regs) = 0; \
-       PT_REGS_ESI(regs) = 0; \
-       PT_REGS_EDI(regs) = 0; \
-       PT_REGS_EBP(regs) = 0; \
-       PT_REGS_EAX(regs) = 0; \
-} while(0)
-
-#define USE_ELF_CORE_DUMP
-#define ELF_EXEC_PAGESIZE 4096
-
-#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
-
-/* Shamelessly stolen from include/asm-i386/elf.h */
-
-#define ELF_CORE_COPY_REGS(pr_reg, regs) do {  \
-       pr_reg[0] = PT_REGS_EBX(regs);          \
-       pr_reg[1] = PT_REGS_ECX(regs);          \
-       pr_reg[2] = PT_REGS_EDX(regs);          \
-       pr_reg[3] = PT_REGS_ESI(regs);          \
-       pr_reg[4] = PT_REGS_EDI(regs);          \
-       pr_reg[5] = PT_REGS_EBP(regs);          \
-       pr_reg[6] = PT_REGS_EAX(regs);          \
-       pr_reg[7] = PT_REGS_DS(regs);           \
-       pr_reg[8] = PT_REGS_ES(regs);           \
-       /* fake once used fs and gs selectors? */       \
-       pr_reg[9] = PT_REGS_DS(regs);           \
-       pr_reg[10] = PT_REGS_DS(regs);          \
-       pr_reg[11] = PT_REGS_SYSCALL_NR(regs);  \
-       pr_reg[12] = PT_REGS_IP(regs);          \
-       pr_reg[13] = PT_REGS_CS(regs);          \
-       pr_reg[14] = PT_REGS_EFLAGS(regs);      \
-       pr_reg[15] = PT_REGS_SP(regs);          \
-       pr_reg[16] = PT_REGS_SS(regs);          \
-} while(0);
-
-extern long elf_aux_hwcap;
-#define ELF_HWCAP (elf_aux_hwcap)
-
-extern char * elf_aux_platform;
-#define ELF_PLATFORM (elf_aux_platform)
-
-#define SET_PERSONALITY(ex, ibcs2) do ; while(0)
-
-extern unsigned long vsyscall_ehdr;
-extern unsigned long vsyscall_end;
-extern unsigned long __kernel_vsyscall;
-
-#define VSYSCALL_BASE vsyscall_ehdr
-#define VSYSCALL_END vsyscall_end
-
-/*
- * This is the range that is readable by user mode, and things
- * acting like user mode such as get_user_pages.
- */
-#define FIXADDR_USER_START      VSYSCALL_BASE
-#define FIXADDR_USER_END        VSYSCALL_END
-
-/*
- * Architecture-neutral AT_ values in 0-17, leave some room
- * for more of them, start the x86-specific ones at 32.
- */
-#define AT_SYSINFO             32
-#define AT_SYSINFO_EHDR                33
-
-#define ARCH_DLINFO                                            \
-do {                                                           \
-       if ( vsyscall_ehdr ) {                                  \
-               NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall);     \
-               NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr);    \
-       }                                                       \
-} while (0)
-
-/*
- * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
- * extra segments containing the vsyscall DSO contents.  Dumping its
- * contents makes post-mortem fully interpretable later without matching up
- * the same kernel and hardware config to see what PC values meant.
- * Dumping its extra ELF program headers includes all the other information
- * a debugger needs to easily find how the vsyscall DSO was being used.
- */
-#define ELF_CORE_EXTRA_PHDRS                                                 \
-       (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 )
-
-#define ELF_CORE_WRITE_EXTRA_PHDRS                                           \
-if ( vsyscall_ehdr ) {                                                       \
-       const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
-       const struct elf_phdr *const phdrp =                                  \
-               (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
-       int i;                                                                \
-       Elf32_Off ofs = 0;                                                    \
-       for (i = 0; i < ehdrp->e_phnum; ++i) {                                \
-               struct elf_phdr phdr = phdrp[i];                              \
-               if (phdr.p_type == PT_LOAD) {                                 \
-                       ofs = phdr.p_offset = offset;                         \
-                       offset += phdr.p_filesz;                              \
-               }                                                             \
-               else                                                          \
-                       phdr.p_offset += ofs;                                 \
-               phdr.p_paddr = 0; /* match other core phdrs */                \
-               DUMP_WRITE(&phdr, sizeof(phdr));                              \
-       }                                                                     \
-}
-#define ELF_CORE_WRITE_EXTRA_DATA                                            \
-if ( vsyscall_ehdr ) {                                                       \
-       const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
-       const struct elf_phdr *const phdrp =                                  \
-               (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
-       int i;                                                                \
-       for (i = 0; i < ehdrp->e_phnum; ++i) {                                \
-               if (phdrp[i].p_type == PT_LOAD)                               \
-                       DUMP_WRITE((void *) phdrp[i].p_vaddr,                 \
-                                  phdrp[i].p_filesz);                        \
-       }                                                                     \
-}
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index c85252e803c130923698b9b3e71fb28c3cecf76f..99f086301f4cba151466532eb41b56f4a2f07fc1 100644 (file)
@@ -2,7 +2,8 @@
 #define SETUP_H_INCLUDED
 
 /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the
- * command line, so this choice is ok.*/
+ * command line, so this choice is ok.
+ */
 
 #define COMMAND_LINE_SIZE 4096
 
index f1ce808501da54e60039fd5a9ab99af30d77a0c5..9b4d74d49f984c9d6a19bc9fd4ccd5c35df1d49b 100644 (file)
@@ -1836,7 +1836,7 @@ static void __devinit snd_via82xx_proc_init(via82xx_t *chip)
  *
  */
 
-static int __devinit snd_via82xx_chip_init(via82xx_t *chip)
+static int snd_via82xx_chip_init(via82xx_t *chip)
 {
        unsigned int val;
        int max_count;
This page took 0.061298 seconds and 5 git commands to generate.