kernel_optimize_test/arch/mips/mti-malta
Paul Burton 93c5bba575 MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts
There's no reason for us not to use BIT() & GENMASK() in asm/mips-cm.h
when declaring macros corresponding to register fields. This patch
modifies our definitions to do so.

The *_SHF definitions are removed entirely - they duplicate information
found in the masks, are infrequently used & can be replaced with use of
__ffs() where needed.

The *_MSK definitions then lose their _MSK suffix which is now somewhat
redundant, and users are modified to match.

The field definitions are moved to follow the appropriate register's
accessor functions, which helps to keep the field definitions in order &
to find the appropriate fields for a given register. Whilst here a
comment is added describing each register & including its name, which is
helpful both for linking the register back to hardware documentation &
for grepping purposes.

This also cleans up a couple of issues that became obvious as a result
of making the changes described above:

  - We previously had definitions for GCR_Cx_RESET_EXT_BASE & a phony
    copy of that named GCR_RESET_EXT_BASE - a register which does not
    exist. The bad definitions were added by commit 497e803ebf ("MIPS:
    smp-cps: Ensure secondary cores start with EVA disabled") and made
    use of from boot_core(), which is now modified to use the
    GCR_Cx_RESET_EXT_BASE definitions.

  - We had a typo in CM_GCR_ERROR_CAUSE_ERRINGO_MSK - we now correctly
    define this as inFo rather than inGo.

Now that we don't duplicate field information between _SHF & _MSK
definitions, and keep the fields next to the register accessors, it will
be much easier to spot & prevent any similar oddities being introduced
in the future.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17001/
Patchwork: https://patchwork.linux-mips.org/patch/17216/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-08-29 15:21:57 +02:00
..
Makefile
malta-amon.c
malta-display.c
malta-dt.c MIPS: Malta: Remove custom DT match table 2016-10-06 17:31:01 +02:00
malta-dtshim.c MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts 2017-08-29 15:21:57 +02:00
malta-init.c MIPS: Malta: Allow PCI devices DMA to lower 2GB physical 2016-10-06 17:31:00 +02:00
malta-int.c Merge branch '4.11-fixes' into mips-for-linux-next 2017-04-13 00:48:47 +02:00
malta-memory.c tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
malta-platform.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
malta-pm.c
malta-reset.c MIPS: Malta: Remove custom halt implementation 2016-10-06 17:31:01 +02:00
malta-setup.c MIPS: Print CM error reports upon bus errors 2016-10-06 18:02:18 +02:00
malta-time.c clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
Platform