[rtems commit] riscv: Avoid namespace pollution
Sebastian Huber
sebh at rtems.org
Fri Jun 29 09:58:14 UTC 2018
Module: rtems
Branch: master
Commit: 3be4478f5a118bd55e0426c0d36f75b1db335ceb
Changeset: http://git.rtems.org/rtems/commit/?id=3be4478f5a118bd55e0426c0d36f75b1db335ceb
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jun 26 07:13:28 2018 +0200
riscv: Avoid namespace pollution
Remove <rtems/score/riscv-utility.h> include from <rtems/score/cpu.h>
(which is visible via <rtems.h> for example).
Update #3433.
---
bsps/riscv/riscv/clock/clockdrv.c | 1 +
cpukit/score/cpu/riscv/cpu.c | 5 ++---
cpukit/score/cpu/riscv/include/rtems/score/cpu.h | 8 +-------
cpukit/score/cpu/riscv/riscv-context-switch.S | 1 +
4 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/bsps/riscv/riscv/clock/clockdrv.c b/bsps/riscv/riscv/clock/clockdrv.c
index 8be2037..6a5d2db 100644
--- a/bsps/riscv/riscv/clock/clockdrv.c
+++ b/bsps/riscv/riscv/clock/clockdrv.c
@@ -33,6 +33,7 @@
*/
#include <rtems/timecounter.h>
+#include <rtems/score/riscv-utility.h>
#include <bsp.h>
#include <bsp/fatal.h>
diff --git a/cpukit/score/cpu/riscv/cpu.c b/cpukit/score/cpu/riscv/cpu.c
index 7c14a8b..deae25d 100644
--- a/cpukit/score/cpu/riscv/cpu.c
+++ b/cpukit/score/cpu/riscv/cpu.c
@@ -29,10 +29,9 @@
* SUCH DAMAGE.
*/
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/wkspace.h>
#include <rtems/score/cpu.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/riscv-utility.h>
/* bsp_start_vector_table_begin is the start address of the vector table
* containing addresses to ISR Handlers. It's defined at the BSP linkcmds
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index 15a75c8..30adbbc 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -40,13 +40,7 @@ extern "C" {
#endif
#include <rtems/score/basedefs.h>
-#include <rtems/score/riscv.h> /* pick up machine definitions */
-#include <rtems/score/riscv-utility.h>
-#ifndef ASM
-#include <rtems/bspIo.h>
-#include <stdint.h>
-#include <stdio.h> /* for printk */
-#endif
+#include <rtems/score/riscv.h>
#define RISCV_MSTATUS_MIE 0x8
diff --git a/cpukit/score/cpu/riscv/riscv-context-switch.S b/cpukit/score/cpu/riscv/riscv-context-switch.S
index 705cd77..b5e4352 100644
--- a/cpukit/score/cpu/riscv/riscv-context-switch.S
+++ b/cpukit/score/cpu/riscv/riscv-context-switch.S
@@ -32,6 +32,7 @@
#include <rtems/asm.h>
#include <rtems/score/cpu.h>
+#include <rtems/score/riscv-utility.h>
.section .text, "ax", @progbits
.align 2
More information about the vc
mailing list