1. 27 11月, 2008 2 次提交
  2. 24 11月, 2008 1 次提交
    • C
      x86: introduce ENTRY(KPROBE_ENTRY)_X86 assembly helpers to catch unbalanced declaration v3 · 3b6c52b5
      Cyrill Gorcunov 提交于
      Impact: make ENTRY()/END() macros more capable
      
      It's usefull to catch unbalanced or messed or mixed declarations of ENTRY and
      KPROBES. These macros would help a bit.
      
      For example the following code would compile without problems
      
              ENTRY_X86(mcount)
                      retq
              END_X86(mcount)
      
      But if you forget and mess the following form
      
              ENTRY_X86(mcount)
                      retq
              END(mcount)
      
              ENTRY_X86(ftrace_caller)
      
      The assembler will issue the following message:
      Error: ENTRY_X86/KPROBE_X86 unbalanced,missed,mixed
      
      Actually the checking is performed at every _X86 macro
      so maybe it's good idea to put ENTRY_KPROBE_FINAL_X86
      at the end of .S file to be sure you didn't miss anything.
      Signed-off-by: NCyrill Gorcunov <gorcunov@gmail.com>
      Cc: Alexander van Heukelum <heukelum@mailshack.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3b6c52b5
  3. 23 11月, 2008 3 次提交
  4. 22 11月, 2008 4 次提交
  5. 21 11月, 2008 3 次提交
    • I
      x86: entry_64.S: rename · 14ae22ba
      Ingo Molnar 提交于
      Impact: cleanup
      
      Rename:
      
         CFI_PUSHQ  =>  pushq_cfi
         CFI_POPQ   =>  popq_cfi
         CFI_MOVQ   =>  movq_cfi
      
      To make it blend better into regular assembly code.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      14ae22ba
    • I
      x86: clean up after: move entry_64.S register saving out of the macros, fix · e8a0e276
      Ingo Molnar 提交于
      Impact: build fix
      
      The break builds with older binutils (2.16.1):
      
       arch/x86/kernel/entry_64.S: Assembler messages:
       arch/x86/kernel/entry_64.S:282: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:283: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:284: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:285: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:286: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:287: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:288: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:289: Error: too many positional arguments
       arch/x86/kernel/entry_64.S:290: Error: too many positional arguments
      
      Took some time to figure out the detail that GAS chokes on: it's
      negative offsets. Rearrange the calculations to make sure we never
      go negative.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e8a0e276
    • A
      x86: clean up after: move entry_64.S register saving out of the macros · dcd072e2
      Alexander van Heukelum 提交于
      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: NAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dcd072e2
  6. 20 11月, 2008 2 次提交
    • A
      x86: move entry_64.S register saving out of the macros · d99015b1
      Alexander van Heukelum 提交于
      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: NAlexander van Heukelum <heukelum@fastmail.fm>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d99015b1
    • I
      Merge branch 'x86/cleanups' into x86/irq · c032a2de
      Ingo Molnar 提交于
      [ 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
  7. 18 11月, 2008 4 次提交
    • I
      Merge branch 'x86/urgent' into x86/cleanups · cbe9ee00
      Ingo Molnar 提交于
      cbe9ee00
    • I
      x86, PEBS/DS: fix code flow in ds_request() · 10db4ef7
      Ingo Molnar 提交于
      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: NIngo Molnar <mingo@elte.hu>
      10db4ef7
    • V
      x86: add rdtsc barrier to TSC sync check · 93ce99e8
      Venki Pallipadi 提交于
      Impact: fix incorrectly marked unstable TSC clock
      
      Patch (commit 0d12cdd5 "sched: improve sched_clock() performance") has
      a regression on one of the test systems here.
      
      With the patch, I see:
      
       checking TSC synchronization [CPU#0 -> CPU#1]:
       Measured 28 cycles TSC warp between CPUs, turning off TSC clock.
       Marking TSC unstable due to check_tsc_sync_source failed
      
      Whereas, without the patch syncs pass fine on all CPUs:
      
       checking TSC synchronization [CPU#0 -> CPU#1]: passed.
      
      Due to this, TSC is marked unstable, when it is not actually unstable.
      This is because syncs in check_tsc_wrap() goes away due to this commit.
      
      As per the discussion on this thread, correct way to fix this is to add
      explicit syncs as below?
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      93ce99e8
    • J
      xen: fix scrub_page() · 26a3e991
      Jeremy Fitzhardinge 提交于
      Impact: fix guest kernel crash with CONFIG_XEN_SCRUB_PAGES=y
      
      Jens noticed that scrub_page() has a buggy unmap of the wrong
      thing. (virtual address instead of page)
      
      Linus pointed out that the whole scrub_page() code is an unnecessary
      reimplementation of clear_highpage() to begin with.
      
      Just use clear_highpage() rather than reimplementing it poorly.
      Reported-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      26a3e991
  8. 17 11月, 2008 2 次提交
  9. 16 11月, 2008 19 次提交