1. 21 Nov, 2008 4 commits
  2. 20 Nov, 2008 3 commits
    • Alexander van Heukelum's avatar
      x86: clean up after: move entry_64.S register saving out of the macros · dcd072e2
      Alexander van Heukelum authored
      This add-on patch to x86: move entry_64.S register saving out
      of the macros visually cleans up the appearance of the code by
      introducing some basic helper macro's. It also adds some cfi
      annotations which were missing.
      Signed-off-by: default avatarAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      dcd072e2
    • Alexander van Heukelum's avatar
      x86: move entry_64.S register saving out of the macros · d99015b1
      Alexander van Heukelum authored
      Here is a combined patch that moves "save_args" out-of-line for
      the interrupt macro and moves "error_entry" mostly out-of-line
      for the zeroentry and errorentry macros.
      
      The save_args function becomes really straightforward and easy
      to understand, with the possible exception of the stack switch
      code, which now needs to copy the return address of to the
      calling function. Normal interrupts arrive with ((~vector)-0x80)
      on the stack, which gets adjusted in common_interrupt:
      
      <common_interrupt>:
      (5)  addq   $0xffffffffffffff80,(%rsp)		/* -> ~(vector) */
      (4)  sub    $0x50,%rsp				/* space for registers */
      (5)  callq  ffffffff80211290 <save_args>
      (5)  callq  ffffffff80214290 <do_IRQ>
      <ret_from_intr>:
           ...
      
      An apic interrupt stub now look like this:
      
      <thermal_interrupt>:
      (5)  pushq  $0xffffffffffffff05			/* ~(vector) */
      (4)  sub    $0x50,%rsp				/* space for registers */
      (5)  callq  ffffffff80211290 <save_args>
      (5)  callq  ffffffff80212b8f <smp_thermal_interrupt>
      (5)  jmpq   ffffffff80211f93 <ret_from_intr>
      
      Similarly the exception handler register saving function becomes
      simpler, without the need of any parameter shuffling. The stub
      for an exception without errorcode looks like this:
      
      <overflow>:
      (6)  callq  *0x1cad12(%rip)        # ffffffff803dd448 <pv_irq_ops+0x38>
      (2)  pushq  $0xffffffffffffffff			/* no syscall */
      (4)  sub    $0x78,%rsp				/* space for registers */
      (5)  callq  ffffffff8030e3b0 <error_entry>
      (3)  mov    %rsp,%rdi				/* pt_regs pointer */
      (2)  xor    %esi,%esi				/* no error code */
      (5)  callq  ffffffff80213446 <do_overflow>
      (5)  jmpq   ffffffff8030e460 <error_exit>
      
      And one for an exception with errorcode like this:
      
      <segment_not_present>:
      (6)  callq  *0x1cab92(%rip)        # ffffffff803dd448 <pv_irq_ops+0x38>
      (4)  sub    $0x78,%rsp				/* space for registers */
      (5)  callq  ffffffff8030e3b0 <error_entry>
      (3)  mov    %rsp,%rdi				/* pt_regs pointer */
      (5)  mov    0x78(%rsp),%rsi			/* load error code */
      (9)  movq   $0xffffffffffffffff,0x78(%rsp)	/* no syscall */
      (5)  callq  ffffffff80213209 <do_segment_not_present>
      (5)  jmpq   ffffffff8030e460 <error_exit>
      
      Unfortunately, this last type is more than 32 bytes. But the total space
      savings due to this patch is about 2500 bytes on an smp-configuration,
      and I think the code is clearer than it was before. The tested kernels
      were non-paravirt ones (i.e., without the indirect call at the top of
      the exception handlers).
      
      Anyhow, I tested this patch on top of a recent -tip. The machine
      was an 2x4-core Xeon at 2333MHz. Measured where the delays between
      (almost-)adjacent rdtsc instructions. The graphs show how much
      time is spent outside of the program as a function of the measured
      delay. The area under the graph represents the total time spent
      outside the program. Eight instances of the rdtsctest were
      started, each pinned to a single cpu. The histogams are added.
      For each kernel two measurements were done: one in mostly idle
      condition, the other while running "bonnie++ -f", bound to cpu 0.
      Each measurement took 40 minutes runtime. See the attached graphs
      for the results. The graphs overlap almost everywhere, but there
      are small differences.
      Signed-off-by: default avatarAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d99015b1
    • Ingo Molnar's avatar
      Merge branch 'x86/cleanups' into x86/irq · c032a2de
      Ingo Molnar authored
      [ merged x86/cleanups into x86/irq to enable a wider IRQ entry code
        patch to be applied, which depends on a cleanup patch in x86/cleanups. ]
      c032a2de
  3. 18 Nov, 2008 2 commits
    • Ingo Molnar's avatar
      Merge branch 'x86/urgent' into x86/cleanups · cbe9ee00
      Ingo Molnar authored
      cbe9ee00
    • Ingo Molnar's avatar
      x86, PEBS/DS: fix code flow in ds_request() · 10db4ef7
      Ingo Molnar authored
      this compiler warning:
      
        arch/x86/kernel/ds.c: In function 'ds_request':
        arch/x86/kernel/ds.c:368: warning: 'context' may be used uninitialized in this function
      
      Shows that the code flow in ds_request() is buggy - it goes into
      the unlock+release-context path even when the context is not allocated
      yet.
      
      First allocate the context, then do the other checks.
      
      Also, take care with GFP allocations under the ds_lock spinlock.
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      10db4ef7
  4. 17 Nov, 2008 4 commits
  5. 16 Nov, 2008 2 commits
    • Yinghai Lu's avatar
      x86: fix es7000 compiling · d3c6aa1e
      Yinghai Lu authored
      Impact: fix es7000 build
      
        CC      arch/x86/kernel/es7000_32.o
      arch/x86/kernel/es7000_32.c: In function find_unisys_acpi_oem_table:
      arch/x86/kernel/es7000_32.c:255: error: implicit declaration of function acpi_get_table_with_size
      arch/x86/kernel/es7000_32.c:261: error: implicit declaration of function early_acpi_os_unmap_memory
      arch/x86/kernel/es7000_32.c: In function unmap_unisys_acpi_oem_table:
      arch/x86/kernel/es7000_32.c:277: error: implicit declaration of function __acpi_unmap_table
      make[1]: *** [arch/x86/kernel/es7000_32.o] Error 1
      
      we applied one patch out of order...
      
      | commit a73aaedd
      | Author: Yinghai Lu <yhlu.kernel@gmail.com>
      | Date:   Sun Sep 14 02:33:14 2008 -0700
      |
      |    x86: check dsdt before find oem table for es7000, v2
      |
      |    v2: use __acpi_unmap_table()
      
      that patch need:
      
      	x86: use early_ioremap in __acpi_map_table
      	x86: always explicitly map acpi memory
      	acpi: remove final __acpi_map_table mapping before setting acpi_gbl_permanent_mmap
      	acpi/x86: introduce __apci_map_table, v4
      
      submitted to the ACPI tree but not upstream yet.
      
      fix it until those patches applied, need to revert this one
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d3c6aa1e
    • Markus Metzger's avatar
      x86, bts: fix unlock problem in ds.c · d1f1e9c0
      Markus Metzger authored
      Fix a problem where ds_request() returned an error without releasing the
      ds lock.
      Reported-by: default avatarStephane Eranian <eranian@gmail.com>
      Signed-off-by: default avatarMarkus Metzger <markus.t.metzger@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d1f1e9c0
  6. 15 Nov, 2008 17 commits
  7. 14 Nov, 2008 8 commits
    • Tejun Heo's avatar
      libata: improve phantom device detection · 6a6b97d3
      Tejun Heo authored
      Currently libata uses four methods to detect device presence.
      
      1. PHY status if available.
      2. TF register R/W test (only promotes presence, never demotes)
      3. device signature after reset
      4. IDENTIFY failure detection in SFF state machine
      
      Combination of the above works well in most cases but recently there
      have been a few reports where a phantom device causes unnecessary
      delay during probe.  In both cases, PHY status wasn't available.  In
      one case, it passed #2 and #3 and failed IDENTIFY with ATA_ERR which
      didn't qualify as #4.  The other failed #2 but as it passed #3 and #4,
      it still caused failure.
      
      In both cases, phantom device reported diagnostic failure, so these
      cases can be safely worked around by considering any !ATA_DRQ IDENTIFY
      failure as NODEV_HINT if diagnostic failure is set.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      6a6b97d3
    • Randy Dunlap's avatar
      9p: restrict RDMA usage · 4ff429e6
      Randy Dunlap authored
      linux-next:
      
      Make 9p's RDMA option depend on INET since it uses Infiniband rdma_*
      functions and that code depends on INET.  Otherwise 9p can try to
      use symbols which don't exist.
      
      ERROR: "rdma_destroy_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_connect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_route" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_addr" [net/9p/9pnet_rdma.ko] undefined!
      
      I used an if/endif block so that the menu items would remain
      presented together.
      
      Also correct an article adjective.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      4ff429e6
    • Randy Dunlap's avatar
      Create/use more directory structure in the Documentation/ tree. · 31c00fc1
      Randy Dunlap authored
      Create Documentation/blockdev/ sub-directory and populate it.
      Populate the Documentation/serial/ sub-directory.
      Move MSI-HOWTO.txt to Documentation/PCI/.
      Move ioctl-number.txt to Documentation/ioctl/.
      Update all relevant 00-INDEX files.
      Update all relevant Kconfig files and source files.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      31c00fc1
    • Martin Schwidefsky's avatar
      [S390] fix s390x_newuname · d2f019fe
      Martin Schwidefsky authored
      The uname system call for 64 bit compares current->personality without
      masking the upper 16 bits. If e.g. READ_IMPLIES_EXEC is set the result
      of a uname system call will always be s390x even if the process uses
      the s390 personality.
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      d2f019fe
    • Stefan Haberland's avatar
      [S390] dasd: log sense for fatal errors · a9cffb22
      Stefan Haberland authored
      The logging of sense data for fatal errors was accidentally removed
      during Hyper PAV implementation.
      Signed-off-by: default avatarStefan Haberland <stefan.haberland@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      a9cffb22
    • Heiko Carstens's avatar
      [S390] cpu topology: fix locking · 74af2831
      Heiko Carstens authored
      cpu_coregroup_map used to grab a mutex on s390 since it was only
      called from process context.
      Since c7c22e4d "block: add support
      for IO CPU affinity" this is not true anymore.
      It now also gets called from softirq context.
      
      To prevent possible deadlocks change this in architecture code and
      use a spinlock instead of a mutex.
      
      Cc: stable@kernel.org
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      74af2831
    • Cornelia Huck's avatar
      [S390] cio: Fix refcount after moving devices. · 85acc407
      Cornelia Huck authored
      In ccw_device_move_to_orphanage(), a replacing ccw_device
      is searched via get_{disc,orphaned}_ccwdev_by_dev_id()
      which obtain a reference on the returned ccw_device.
      This reference must be given up again after the device
      has been moved to its new parent.
      Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      85acc407
    • Heiko Carstens's avatar
      [S390] ftrace: fix kernel stack backchain walking · 50bec4ce
      Heiko Carstens authored
      With CONFIG_IRQSOFF_TRACER the trace_hardirqs_off() function includes
      a call to __builtin_return_address(1). But we calltrace_hardirqs_off()
      from early entry code. There we have just a single stack frame.
      So this results in a kernel stack backchain walk that would walk beyond
      the kernel stack. Following the NULL terminated backchain this results
      in a lowcore read access.
      
      To fix this we simply call trace_hardirqs_off_caller() and pass the
      current instruction pointer.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      50bec4ce