powerpc/kernel/sysfs: Refactor current sysfs.c
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Fri, 14 Feb 2020 08:06:05 +0000 (13:36 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:44:28 +0000 (22:44 +1100)
commitfcdb524d440d6326c286006e16f252b40ba4fd6a
tree2dccf50ad57391cb23c8a6c8a7740911cf780766
parent672e480aa21023fc8e4b6ab8635d8898822b97e7
powerpc/kernel/sysfs: Refactor current sysfs.c

An attempt to refactor the current sysfs.c file.
To start with a big chuck of macro #defines and dscr
functions are moved to start of the file. Secondly,
HAS_ #define macros are cleanup based on CONFIG_ options

Finally new HAS_ macro added:
1. HAS_PPC_PA6T (for PA6T) to separate out non-PMU SPRs.
2. HAS_PPC_PMC56 to separate out PMC SPR's from HAS_PPC_PMC_CLASSIC
   which come under CONFIG_PPC64.

Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200214080606.26872-1-kjain@linux.ibm.com
arch/powerpc/kernel/sysfs.c