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]
Date:	Mon, 29 Mar 2010 18:48:58 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Robert Richter <robert.richter@....com>
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 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.

--
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