1. 14 7月, 2008 5 次提交
  2. 10 6月, 2008 1 次提交
  3. 30 5月, 2008 2 次提交
  4. 17 5月, 2008 1 次提交
  5. 15 5月, 2008 3 次提交
  6. 07 5月, 2008 3 次提交
  7. 04 5月, 2008 1 次提交
    • U
      unified (weak) sys_pipe implementation · d35c7b0e
      Ulrich Drepper 提交于
      This replaces the duplicated arch-specific versions of "sys_pipe()" with
      one unified implementation.  This removes almost 250 lines of duplicated
      code.
      
      It's marked __weak, so that *if* an architecture wants to override the
      default implementation it can do so by simply having its own replacement
      version, since many architectures use alternate calling conventions for
      the 'pipe()' system call for legacy reasons (ie traditional UNIX
      implementations often return the two file descriptors in registers)
      
      I still haven't changed the cris version even though Linus says the BKL
      isn't needed.  The arch maintainer can easily do it if there are really
      no obstacles.
      Signed-off-by: NUlrich Drepper <drepper@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d35c7b0e
  8. 30 4月, 2008 12 次提交
    • R
      signals: s390: renumber TIF_RESTORE_SIGMASK · 02a029b3
      Roland McGrath 提交于
      TIF_RESTORE_SIGMASK no longer needs to be in the _TIF_WORK_* masks.  Those low
      bits are scarce, and are all used up now.  Renumber TIF_RESTORE_SIGMASK to
      free one up.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      02a029b3
    • M
      [S390] use generic sys_ptrace · 941af343
      Martin Schwidefsky 提交于
      After the PT_IEEE_IP hack has been removed s390 can now use
      the common code sys_ptrace function.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      941af343
    • M
      [S390] Remove self ptrace IEEE_IP hack. · 613e1def
      Martin Schwidefsky 提交于
      The self referential PT_IEEE_IP ptrace peek & poke calls have been
      broken for that last 6 years. For peek the code always returns 0
      instead of the last ieee fault and for poke the code does nothing.
      Since nobody noticed the code seems to be superfluous. So lets
      remove it.
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      613e1def
    • G
      [S390] System z large page support. · 53492b1d
      Gerald Schaefer 提交于
      This adds hugetlbfs support on System z, using both hardware large page
      support if available and software large page emulation on older hardware.
      Shared (large) page tables are implemented in software emulation mode,
      by using page->index of the first tail page from a compound large page
      to store page table information.
      Signed-off-by: NGerald Schaefer <geraldsc@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      53492b1d
    • H
      [S390] Convert machine feature detection code to C. · 2e5061e4
      Heiko Carstens 提交于
      From: Heiko Carstens <heiko.carstens@de.ibm.com>
      From: Carsten Otte <cotte@de.ibm.com>
      
      This lets us use defines for the magic bits in machine flags instead
      of using plain numbers all over the place.
      In addition on newer machines features/facilities are indicated by the
      result of the stfl instruction. So we use these bits instead of trying
      to execute new instructions and check wether we get an exception or
      not.
      Also the mvpg instruction is always available when in zArch mode,
      whereas the idte instruction is only available in zArch mode. This
      results in some minor optimizations.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      2e5061e4
    • H
    • H
      [S390] cpu topology: Fix possible deadlock. · fd781fa2
      Heiko Carstens 提交于
      When we get a notification that cpu topology changed, we schedule a
      work struct which just calls arch_reinit_sched_domains. This function
      in turn calls get_online_cpus() which results int the lockdep warning
      below.
      
      After all it turnded out that it's not legal to call get_online_cpus()
      from the context of a multi-threaded work queue.
      It could deadlock this way:
      
      process 0 (events/cpu-x):
      -> run_workqueue
      -> removes my work_struct from the work queue
      -> calls work_struct->fn
      -> get_online_cpus()
      -> locks on cpu_hotplug.lock since process 1 below is doing cpu hotplug
      
      process 1:
      -> cpu_down (for cpu-x)
      -> cpu_hotplug_begin (holds cpu_hotplug.lock now)
      -> cpu-x dead
      -> notifier_call_chain with CPU_DEAD
      -> cleanup_workqueue_thread
      -> flush_cpu_workqueue (succeeds)
      -> kthread_stop for events/cpu-x
        -> now kthread_stop waits for my work_struct to complete from within
           process 0. -> dead.
      
      A single threaded workqueue wouldn't have such problems, however there is
      no such common queue available and it's not worth to create one for the
      very rare calls to arch_reinit_sched_domains.
      
      So we just create a kernel thread from our work struct which calls
      arch_reinit_sched_domains and are done with it.
      
      Thanks to Oleg Nesterov and Peter Zijlstra for helping me figuring out
      that this isn't a false positive lockdep warning:
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.25-03562-g3dc50637-dirty #12
      -------------------------------------------------------
      events/3/14 is trying to acquire lock:
       (&cpu_hotplug.lock){--..}, at: [<0000000000076094>] get_online_cpus+0x50/0x78
      
      but task is already holding lock:
       (topology_work){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #2 (topology_work){--..}:
             [<000000000006fc74>] __lock_acquire+0x1010/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<0000000000059d48>] run_workqueue+0x170/0x278
             [<0000000000059edc>] worker_thread+0x8c/0xf0
             [<000000000005f5bc>] kthread+0x68/0xa0
             [<000000000001a33e>] kernel_thread_starter+0x6/0xc
             [<000000000001a338>] kernel_thread_starter+0x0/0xc
      
      -> #1 (events){--..}:
             [<000000000006fc74>] __lock_acquire+0x1010/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<000000000005a23c>] cleanup_workqueue_thread+0x60/0xa8
             [<00000000003b2ab8>] workqueue_cpu_callback+0xbc/0x170
             [<00000000003bba80>] notifier_call_chain+0x5c/0xa4
             [<00000000000655a2>] __raw_notifier_call_chain+0x26/0x38
             [<00000000000655e2>] raw_notifier_call_chain+0x2e/0x40
             [<0000000000075e00>] cpu_down+0x228/0x31c
             [<00000000003b1dd8>] store_online+0x64/0xb8
             [<00000000001e7128>] sysdev_store+0x48/0x58
             [<0000000000121cd2>] sysfs_write_file+0x126/0x1c0
             [<00000000000c1944>] vfs_write+0xb0/0x15c
             [<00000000000c20e6>] sys_write+0x56/0x88
             [<0000000000027a68>] sys32_write+0x34/0x4c
             [<0000000000023f70>] sysc_noemu+0x10/0x16
             [<0000000077f3f186>] 0x77f3f186
      
      -> #0 (&cpu_hotplug.lock){--..}:
             [<000000000006fa84>] __lock_acquire+0xe20/0x111c
             [<000000000006fe40>] lock_acquire+0xc0/0xf8
             [<00000000003b701c>] mutex_lock_nested+0xd0/0x364
             [<0000000000076094>] get_online_cpus+0x50/0x78
             [<000000000003a03e>] arch_reinit_sched_domains+0x26/0x58
             [<000000000002700e>] topology_work_fn+0x26/0x34
             [<0000000000059d4e>] run_workqueue+0x176/0x278
             [<0000000000059edc>] worker_thread+0x8c/0xf0
             [<000000000005f5bc>] kthread+0x68/0xa0
             [<000000000001a33e>] kernel_thread_starter+0x6/0xc
             [<000000000001a338>] kernel_thread_starter+0x0/0xc
      
      other info that might help us debug this:
      
      2 locks held by events/3/14:
       #0:  (events){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
       #1:  (topology_work){--..}, at: [<0000000000059cde>] run_workqueue+0x106/0x278
      
      stack backtrace:
      CPU: 3 Not tainted 2.6.25-03562-g3dc50637-dirty #12
      Process events/3 (pid: 14, task: 000000002fb04038, ksp: 000000002fb0bd70)
      0400000000000000 000000002fb0ba40 0000000000000002 0000000000000000
             000000002fb0bae0 000000002fb0ba58 000000002fb0ba58 0000000000016488
             0000000000000000 000000002fb0bd70 0000000000000000 0000000000000000
             000000002fb0ba40 000000000000000c 000000002fb0ba40 000000002fb0bab0
             00000000003c99e0 0000000000016488 000000002fb0ba40 000000002fb0ba90
      Call Trace:
      ([<00000000000163fc>] show_trace+0x138/0x158)
       [<00000000000164e2>] show_stack+0xc6/0xf8
       [<0000000000016624>] dump_stack+0xb0/0xc0
       [<000000000006cd36>] print_circular_bug_tail+0xa2/0xb4
       [<000000000006fa84>] __lock_acquire+0xe20/0x111c
       [<000000000006fe40>] lock_acquire+0xc0/0xf8
       [<00000000003b701c>] mutex_lock_nested+0xd0/0x364
       [<0000000000076094>] get_online_cpus+0x50/0x78
       [<000000000003a03e>] arch_reinit_sched_domains+0x26/0x58
       [<000000000002700e>] topology_work_fn+0x26/0x34
       [<0000000000059d4e>] run_workqueue+0x176/0x278
       [<0000000000059edc>] worker_thread+0x8c/0xf0
       [<000000000005f5bc>] kthread+0x68/0xa0
       [<000000000001a33e>] kernel_thread_starter+0x6/0xc
       [<000000000001a338>] kernel_thread_starter+0x0/0xc
      INFO: lockdep is turned off.
      
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fd781fa2
    • H
      [S390] Add topology_core_siblings to topology.h · d00aa4e7
      Heiko Carstens 提交于
      This exposes the core siblings to user space via sysfs.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      d00aa4e7
    • M
      [S390] remove -traditional · 47494f6a
      Mathieu Desnoyers 提交于
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      CC: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      47494f6a
    • H
      1e489518
    • H
      [S390] smp: Fix locking order. · 0b18d318
      Heiko Carstens 提交于
      On some smp sysfs store attributes get_online_cpus() may block on
      cpu_hotplug.lock, but we hold already smp_cpu_state_mutex. Since the
      locking order on cpu hotplug via arch_update_cpu_topology is inverse
      this might lead to deadlocks.
      So make sure locking order is always the same.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0b18d318
    • H
      [S390] Move show_regs to traps.c. · 4e83be7b
      Heiko Carstens 提交于
      This is where it should be and we can get rid of some externs
      and a static inline function.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      4e83be7b
  9. 29 4月, 2008 3 次提交
  10. 27 4月, 2008 3 次提交
    • C
      s390: KVM guest: detect when running on kvm · fa587743
      Carsten Otte 提交于
      This patch adds functionality to detect if the kernel runs under the KVM
      hypervisor. A macro MACHINE_IS_KVM is exported for device drivers. This
      allows drivers to skip device detection if the systems runs non-virtualized.
      We also define a preferred console to avoid having the ttyS0, which is a line
      mode only console.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      fa587743
    • H
      KVM: s390: arch backend for the kvm kernel module · b0c632db
      Heiko Carstens 提交于
      This patch contains the port of Qumranet's kvm kernel module to IBM zSeries
       (aka s390x, mainframe) architecture. It uses the mainframe's virtualization
      instruction SIE to run virtual machines with up to 64 virtual CPUs each.
      This port is only usable on 64bit host kernels, and can only run 64bit guest
      kernels. However, running 31bit applications in guest userspace is possible.
      
      The following source files are introduced by this patch
      arch/s390/kvm/kvm-s390.c    similar to arch/x86/kvm/x86.c, this implements all
                                  arch callbacks for kvm. __vcpu_run calls back into
                                  sie64a to enter the guest machine context
      arch/s390/kvm/sie64a.S      assembler function sie64a, which enters guest
                                  context via SIE, and switches world before and after                            that
      include/asm-s390/kvm_host.h contains all vital data structures needed to run
                                  virtual machines on the mainframe
      include/asm-s390/kvm.h      defines kvm_regs and friends for user access to
                                  guest register content
      arch/s390/kvm/gaccess.h     functions similar to uaccess to access guest memory
      arch/s390/kvm/kvm-s390.h    header file for kvm-s390 internals, extended by
                                  later patches
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      b0c632db
    • C
      s390: KVM preparation: provide hook to enable pgstes in user pagetable · 402b0862
      Carsten Otte 提交于
      The SIE instruction on s390 uses the 2nd half of the page table page to
      virtualize the storage keys of a guest. This patch offers the s390_enable_sie
      function, which reorganizes the page tables of a single-threaded process to
      reserve space in the page table:
      s390_enable_sie makes sure that the process is single threaded and then uses
      dup_mm to create a new mm with reorganized page tables. The old mm is freed
      and the process has now a page status extended field after every page table.
      
      Code that wants to exploit pgstes should SELECT CONFIG_PGSTE.
      
      This patch has a small common code hit, namely making dup_mm non-static.
      
      Edit (Carsten): I've modified Martin's patch, following Jeremy Fitzhardinge's
      review feedback. Now we do have the prototype for dup_mm in
      include/linux/sched.h. Following Martin's suggestion, s390_enable_sie() does now
      call task_lock() to prevent race against ptrace modification of mm_users.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Acked-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      402b0862
  11. 19 4月, 2008 1 次提交
  12. 17 4月, 2008 5 次提交
    • M
      Generic semaphore implementation · 64ac24e7
      Matthew Wilcox 提交于
      Semaphores are no longer performance-critical, so a generic C
      implementation is better for maintainability, debuggability and
      extensibility.  Thanks to Peter Zijlstra for fixing the lockdep
      warning.  Thanks to Harvey Harrison for pointing out that the
      unlikely() was unnecessary.
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      64ac24e7
    • C
      [S390] kernel: show last breaking-event-address on oops · 9e74a6b8
      Christian Borntraeger 提交于
      Newer s390 models have a breaking-event-address-recording register.
      Each time an instruction causes a break in the sequential instruction
      execution, the address is saved in that hardware register. On a program
      interrupt the address is copied to the lowcore address 272-279, which
      makes it software accessible.
      
      This patch changes the program check handler and the stack overflow
      checker to copy the value into the pt_regs argument.
      The oops output is enhanced to show the last known breaking address.
      It might give additional information if the stack trace is corrupted.
      
      The feature is only available on 64 bit.
      
      The new oops output looks like:
      
      [---------snip----------]
      Modules linked in: vmcp sunrpc qeth_l2 dm_mod qeth ccwgroup
      CPU: 2 Not tainted 2.6.24zlive-host #8
      Process modprobe (pid: 4788, task: 00000000bf3d8718, ksp: 00000000b2b0b8e0)
      Krnl PSW : 0704200180000000 000003e000020028 (vmcp_init+0x28/0xe4 [vmcp])
                 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
      Krnl GPRS: 0000000004000002 000003e000020000 0000000000000000 0000000000000001
                 000000000015734c ffffffffffffffff 000003e0000b3b00 0000000000000000
                 000003e00007ca30 00000000b5bb5d40 00000000b5bb5800 000003e0000b3b00
                 000003e0000a2000 00000000003ecf50 00000000b2b0bd50 00000000b2b0bcb0
      Krnl Code: 000003e000020018: c0c000040ff4       larl    %r12,3e0000a2000
                 000003e00002001e: e3e0f0000024       stg     %r14,0(%r15)
                 000003e000020024: a7f40001           brc     15,3e000020026
                >000003e000020028: e310c0100004       lg      %r1,16(%r12)
                 000003e00002002e: c020000413dc       larl    %r2,3e0000a27e6
                 000003e000020034: c0a00004aee6       larl    %r10,3e0000b5e00
                 000003e00002003a: a7490001           lghi    %r4,1
                 000003e00002003e: a75900f0           lghi    %r5,240
      Call Trace:
      ([<000000000014b300>] blocking_notifier_call_chain+0x2c/0x40)
       [<000000000015735c>] sys_init_module+0x19d8/0x1b08
       [<0000000000110afc>] sysc_noemu+0x10/0x16
       [<000002000011cda2>] 0x2000011cda2
      Last Breaking-Event-Address:
       [<000003e000020024>] vmcp_init+0x24/0xe4 [vmcp]
      [---------snip----------]
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      9e74a6b8
    • H
      [S390] Fix a lot of sparse warnings. · a806170e
      Heiko Carstens 提交于
      Most noteable part of this commit is the new local header file entry.h
      which contains all the function declarations of functions that get only
      called from asm code or are arch internal. That way we can avoid extern
      declarations in C files.
      This is more or less the same that was done for sparc64.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      a806170e
    • H
      [S390] Convert s390 to GENERIC_CLOCKEVENTS. · 5a62b192
      Heiko Carstens 提交于
      This way we get rid of s390's NO_IDLE_HZ and use the generic dynticks
      variant instead. In addition we get high resolution timers for free.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      5a62b192
    • H
      [S390] Convert monitor calls to function calls. · 43ca5c3a
      Heiko Carstens 提交于
      Remove the program check generating monitor calls and use function
      calls instead. Theres is no real advantage in using monitor calls,
      but they do make debugging harder, because of all the program checks
      it generates.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      43ca5c3a