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] [day] [month] [year] [list]
Message-ID: <87bmpbdjeo.fsf@concordia.ellerman.id.au>
Date:   Mon, 26 Jun 2017 22:26:39 +1000
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        anton@...ba.org, Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc/sysfs: Expose MMCR2 spr in sysfs

Madhavan Srinivasan <maddy@...ux.vnet.ibm.com> writes:

> Monitor Mode Control Register 2 (MMCR2) is a 64-bit
> register that contains 9-bit control fields for
> controlling the operation of PMC1 - PMC6. Patch
> to expose the MMCR2 spr in sysfs.
>
> Signed-off-by: Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/sysfs.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
> index 4437c70c7c2b..587eb3a7b5da 100644
> --- a/arch/powerpc/kernel/sysfs.c
> +++ b/arch/powerpc/kernel/sysfs.c
> @@ -482,6 +482,7 @@ SYSFS_PMCSETUP(pmc7, SPRN_PMC7);
>  SYSFS_PMCSETUP(pmc8, SPRN_PMC8);
>  
>  SYSFS_PMCSETUP(mmcra, SPRN_MMCRA);
> +SYSFS_PMCSETUP(mmcr2, SPRN_MMCR2);

We already have it under an #ifdef:

#ifdef HAS_PPC_PMC_G4
SYSFS_PMCSETUP(mmcr2, SPRN_MMCR2);
#endif


Can you reuse that somehow, or rework the #ifdefs.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ