5 Commits
Author SHA1 Message Date
Liu Shixin 27a43a85bc mips: kernel: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code.

Signed-off-by: Liu Shixin <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-09-19 16:40:17 +02:00
Greg Kroah-Hartman d8140426bc mips: kernel: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Ralf Baechle <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Yangtao Li <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Mathieu Malaterre <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: Marcin Nowakowski <[email protected]>
Cc: Yasha Cherikovsky <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
2019-01-22 11:17:20 -08:00
James Hogan 5573f6ad3e MIPS: Print segment physical address when EU=1
Currently the debugfs interface to print the segment configuration
refuses to print the physical address of mapped segments. However if the
EU bit is set these become unmapped at error level (when
CP0_Status.ERL=1), so the physical address is still relevant.

Update the logic to print the physical address of mapped segments when
the EU bit is set, while still hiding the Cache Coherency Attribute
(since EU overrides that to uncached when ERL=1 too).

Signed-off-by: James Hogan <[email protected]>
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/13833/
Signed-off-by: Ralf Baechle <[email protected]>
2016-07-28 11:44:30 +02:00
Paul Burton 75dcfc1d67 MIPS: Declare mips_debugfs_dir in a header
We have many extern declarations of mips_debugfs_dir through arch/mips/
in various C files. Unify them by declaring mips_debugfs_dir in a
header, including it in each affected C file & removing the duplicate
declarations.

Signed-off-by: Paul Burton <[email protected]>
Cc: [email protected]
Cc: Steven J. Hill <[email protected]>
Cc: Alexander Sverdlin <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Leonid Yegoshin <[email protected]>
Cc: Maciej W. Rozycki <[email protected]>
Cc: [email protected]
Cc: Joe Perches <[email protected]>
Cc: Jaedon Shin <[email protected]>
Cc: James Hogan <[email protected]>
Cc: David Daney <[email protected]>
Cc: Zubair Lutfullah Kakakhel <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: James Cowgill <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/11181/
Signed-off-by: Ralf Baechle <[email protected]>
2015-10-26 09:49:42 +01:00
Steven J. Hill 29f9087c52 MIPS: Add debugfs file to print the segmentation control registers
Add a new mips/segments debugfs file to print the 6 segmentation
control registers for supported cores. A sample from a proAptiv core
is given below:

Signed-off-by: John Crispin <[email protected]>
Patchwork: http://patchwork.linux-mips.org/patch/6137/
Segment   Virtual    Size   Access Mode   Physical   Caching   EU
-------   -------    ----   -----------   --------   -------   --
   0      e0000000   512M      MK           UND         U       0
   1      c0000000   512M      MSK          UND         U       0
   2      a0000000   512M      UK           000         2       0
   3      80000000   512M      UK           000         3       0
   4      40000000    1G       MUSK         UND         U       1
   5      00000000    1G       MUSK         UND         U       1

Reviewed-by: James Hogan <[email protected]>
Signed-off-by: Steven J. Hill <[email protected]>
Signed-off-by: Markos Chandras <[email protected]>
2014-01-22 20:19:00 +01:00