• Stephane Eranian's avatar
    perf/x86/intel: Move regs->flags EXACT bit init · d1e7e602
    Stephane Eranian authored
    This patch removes a redundant store on regs->flags introduced
    by commit:
    
      71eb9ee9 ("perf/x86/intel: Fix linear IP of PEBS real_ip on Haswell and later CPUs")
    
    We were clearing the PERF_EFLAGS_EXACT but it was overwritten by
    regs->flags = pebs->flags later on.
    
    The PERF_EFLAGS_EXACT is a software flag using bit 3 of regs->flags.
    X86 marks this bit as Reserved. To make sure this bit is zero before
    we do any IP processing, we clear it explicitly.
    
    Patch also removes the following assignment:
    
    	regs->flags = pebs->flags | (regs->flags & PERF_EFLAGS_VM);
    
    Because there is no regs->flags to preserve anymore because
    set_linear_ip() is not called until later.
    Signed-off-by: default avatarStephane Eranian <eranian@google.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Cc: kan.liang@intel.com
    Link: http://lkml.kernel.org/r/1522909791-32498-1-git-send-email-eranian@google.com
    [ Improve capitalization, punctuation and clarity of comments. ]
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    d1e7e602
ds.c 45.8 KB