Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752378AbdFZM1C (ORCPT ); Mon, 26 Jun 2017 08:27:02 -0400 Received: from ozlabs.org ([103.22.144.67]:55565 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbdFZM0w (ORCPT ); Mon, 26 Jun 2017 08:26:52 -0400 From: Michael Ellerman To: Madhavan Srinivasan Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, anton@samba.org, Madhavan Srinivasan Subject: Re: [PATCH] powerpc/sysfs: Expose MMCR2 spr in sysfs In-Reply-To: <1498417372-27137-1-git-send-email-maddy@linux.vnet.ibm.com> References: <1498417372-27137-1-git-send-email-maddy@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 26 Jun 2017 22:26:39 +1000 Message-ID: <87bmpbdjeo.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 32 Madhavan Srinivasan 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 > --- > 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