[rtems commit] bsps/powerpc: Do no use Newlib internals
Sebastian Huber
sebh at rtems.org
Sat Feb 26 06:03:49 UTC 2022
Module: rtems
Branch: master
Commit: 8a640bf817eab7b556ae17d3fde10c189287eb68
Changeset: http://git.rtems.org/rtems/commit/?id=8a640bf817eab7b556ae17d3fde10c189287eb68
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Feb 25 10:42:04 2022 +0100
bsps/powerpc: Do no use Newlib internals
The struct _reent::__sdidinit member was renamed in a recent Newlib.
---
bsps/powerpc/shared/mmu/e500-mmu.c | 3 ++-
bsps/powerpc/shared/vme/vmeTsi148.c | 3 ++-
bsps/powerpc/shared/vme/vmeUniverse.c | 3 ++-
bsps/powerpc/virtex4/start/mmu.c | 3 ++-
bsps/powerpc/virtex5/start/mmu.c | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/bsps/powerpc/shared/mmu/e500-mmu.c b/bsps/powerpc/shared/mmu/e500-mmu.c
index ee69172..3f62a29 100644
--- a/bsps/powerpc/shared/mmu/e500-mmu.c
+++ b/bsps/powerpc/shared/mmu/e500-mmu.c
@@ -71,6 +71,7 @@
*/
#include <rtems.h>
#include <rtems/bspIo.h>
+#include <rtems/score/sysstate.h>
#include <inttypes.h>
#include <stdio.h>
@@ -125,7 +126,7 @@ myprintf(FILE *f, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/*
* Might be called at an early stage when
* stdio is not yet initialized.
diff --git a/bsps/powerpc/shared/vme/vmeTsi148.c b/bsps/powerpc/shared/vme/vmeTsi148.c
index 3cb3f94..78b9397 100644
--- a/bsps/powerpc/shared/vme/vmeTsi148.c
+++ b/bsps/powerpc/shared/vme/vmeTsi148.c
@@ -54,6 +54,7 @@
#include <rtems/bspIo.h> /* printk */
#include <rtems/error.h> /* printk */
#include <rtems/pci.h>
+#include <rtems/score/sysstate.h>
#include <bsp.h>
#include <libcpu/byteorder.h>
@@ -416,7 +417,7 @@ uprintf(FILE *f, char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/* Might be called at an early stage when
* to a buffer.
*/
diff --git a/bsps/powerpc/shared/vme/vmeUniverse.c b/bsps/powerpc/shared/vme/vmeUniverse.c
index 18fe61f..d0cd8e9 100644
--- a/bsps/powerpc/shared/vme/vmeUniverse.c
+++ b/bsps/powerpc/shared/vme/vmeUniverse.c
@@ -103,6 +103,7 @@
#include <rtems/bspIo.h> /* printk */
#include <rtems/error.h>
#include <rtems/pci.h>
+#include <rtems/score/sysstate.h>
#include <bsp.h>
#include <libcpu/byteorder.h>
@@ -297,7 +298,7 @@ uprintf(FILE *f, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
#ifdef __rtems__
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/* Might be called at an early stage when
* stdio is not yet initialized.
* There is no vprintk, hence we must assemble
diff --git a/bsps/powerpc/virtex4/start/mmu.c b/bsps/powerpc/virtex4/start/mmu.c
index e966197..906ac70 100644
--- a/bsps/powerpc/virtex4/start/mmu.c
+++ b/bsps/powerpc/virtex4/start/mmu.c
@@ -66,6 +66,7 @@
#include <rtems.h>
#include <rtems/bspIo.h>
#include <rtems/powerpc/powerpc.h>
+#include <rtems/score/sysstate.h>
#include <inttypes.h>
#include <stdio.h>
@@ -92,7 +93,7 @@ myprintf(FILE *f, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/* Might be called at an early stage when stdio is not yet initialized. */
vprintk(fmt,ap);
} else {
diff --git a/bsps/powerpc/virtex5/start/mmu.c b/bsps/powerpc/virtex5/start/mmu.c
index 874c57e..e9bbd77 100644
--- a/bsps/powerpc/virtex5/start/mmu.c
+++ b/bsps/powerpc/virtex5/start/mmu.c
@@ -66,6 +66,7 @@
#include <rtems.h>
#include <rtems/bspIo.h>
#include <rtems/powerpc/powerpc.h>
+#include <rtems/score/sysstate.h>
#include <inttypes.h>
#include <stdio.h>
@@ -92,7 +93,7 @@ myprintf(FILE *f, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- if (!f || !_impure_ptr->__sdidinit) {
+ if (!f || !_System_state_Is_up(_System_state_Get())) {
/* Might be called at an early stage when stdio is not yet initialized. */
vprintk(fmt,ap);
} else {
More information about the vc
mailing list