lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100329170113.GD11907@erda.amd.com>
Date:	Mon, 29 Mar 2010 19:01:13 +0200
From:	Robert Richter <robert.richter@....com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Ingo Molnar <mingo@...e.hu>, Stephane Eranian <eranian@...gle.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] perf/core, x86: implement ARCH_PERFMON_EVENTSEL
 bit masks

On 29.03.10 18:48:58, Peter Zijlstra wrote:
> On Mon, 2010-03-29 at 18:36 +0200, Robert Richter wrote:
> > +++ b/arch/x86/kernel/cpu/perf_event_intel.c
> > @@ -454,20 +454,7 @@ static __initconst u64 atom_hw_cache_event_ids
> >  
> >  static u64 intel_pmu_raw_event(u64 hw_event)
> >  {
> > -#define CORE_EVNTSEL_EVENT_MASK                0x000000FFULL
> > -#define CORE_EVNTSEL_UNIT_MASK         0x0000FF00ULL
> > -#define CORE_EVNTSEL_EDGE_MASK         0x00040000ULL
> > -#define CORE_EVNTSEL_INV_MASK          0x00800000ULL
> > -#define CORE_EVNTSEL_REG_MASK          0xFF000000ULL
> > -
> > -#define CORE_EVNTSEL_MASK              \
> > -       (INTEL_ARCH_EVTSEL_MASK |       \
> > -        INTEL_ARCH_UNIT_MASK   |       \
> > -        INTEL_ARCH_EDGE_MASK   |       \
> > -        INTEL_ARCH_INV_MASK    |       \
> > -        INTEL_ARCH_CNT_MASK)
> > -
> > -       return hw_event & CORE_EVNTSEL_MASK;
> > +       return hw_event & X86_RAW_EVENT_MASK;
> >  } 
> 
> Could you fold this with your 2/3 and create x86_pmu_raw_event() which
> lives in arch/x86/kernel/cpu/perf_event.c, that's more consistent wrt
> the X86_RAW_EVENT_MASK name and that way you don't need to re-order the
> #include ""s either.

Ah, yes. Will do this and resend the patches.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@....com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ