Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
8277da4a
Commit
8277da4a
authored
Apr 24, 2018
by
Jean-Claude BAU
Committed by
Adam Wujek
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change IS_ARCH_WRPC by ARCH_IS_WRPC to make it consistant with
ARCH_IS_WRS. Move also definition of ARCH_IS_WRS in ppsi.h.
parent
a1b593e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
ppsi.h
include/ppsi/ppsi.h
+8
-2
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+0
-6
bmc.c
proto-standard/bmc.c
+6
-6
common-fun.c
proto-standard/common-fun.c
+0
-6
No files found.
include/ppsi/ppsi.h
View file @
8277da4a
...
...
@@ -34,9 +34,15 @@
#endif
#ifdef CONFIG_ARCH_WRPC
#define
IS_ARCH
_WRPC() (1)
#define
ARCH_IS
_WRPC() (1)
#else
#define IS_ARCH_WRPC() (0)
#define ARCH_IS_WRPC() (0)
#endif
#ifdef CONFIG_ARCH_WRS
#define ARCH_IS_WRS (1)
#else
#define ARCH_IS_WRS (0)
#endif
/* We can't include pp-printf.h when building freestading, so have it here */
...
...
proto-ext-whiterabbit/wr-servo.c
View file @
8277da4a
...
...
@@ -3,12 +3,6 @@
#include "wr-api.h"
#include <libwr/shmem.h>
#ifdef CONFIG_ARCH_WRS
#define ARCH_IS_WRS 1
#else
#define ARCH_IS_WRS 0
#endif
#ifdef CONFIG_WRPC_FAULTS
#define HAS_FAULTS 1
#else
...
...
proto-standard/bmc.c
View file @
8277da4a
...
...
@@ -624,7 +624,7 @@ static int bmc_state_decision(struct pp_instance *ppi)
}
}
if
(
!
IS_ARCH
_WRPC
()
)
{
if
(
!
ARCH_IS
_WRPC
()
)
{
/* if there is a foreign master take it otherwise just go to master */
if
(
ppg
->
ebest_idx
>=
0
)
{
ppi_best
=
INST
(
ppg
,
ppg
->
ebest_idx
);
...
...
@@ -892,7 +892,7 @@ void bmc_add_frgn_master(struct pp_instance *ppi, void *buf,
pid
->
clockIdentity
.
id
[
6
],
pid
->
clockIdentity
.
id
[
7
],
pid
->
portNumber
);
if
(
!
IS_ARCH
_WRPC
()
&&
DSDEF
(
ppi
)
->
numberPorts
>
1
)
{
if
(
!
ARCH_IS
_WRPC
()
&&
DSDEF
(
ppi
)
->
numberPorts
>
1
)
{
/* Check if announce from the same port from this clock 9.3.2.5 a)
* from another port of this clock we still handle even though it
* states something different in IEEE1588 because in 9.5.2.3
...
...
@@ -1209,7 +1209,7 @@ static void bmc_update_erbest(struct pp_globals *ppg)
* level 2 */
pp_diag
(
INST
(
ppg
,
0
),
bmc
,
2
,
"%s
\n
"
,
__func__
);
if
(
!
IS_ARCH
_WRPC
()
)
/* Optimization for WRPC target : Just one port */
{
if
(
!
ARCH_IS
_WRPC
()
)
/* Optimization for WRPC target : Just one port */
{
for
(
i
=
0
;
i
<
ppg
->
defaultDS
->
numberPorts
;
i
++
)
{
bmc_update_erbest_inst
(
INST
(
ppg
,
i
));
...
...
@@ -1232,7 +1232,7 @@ static void bmc_update_ebest(struct pp_globals *ppg)
* level 2 */
pp_diag
(
INST
(
ppg
,
0
),
bmc
,
2
,
"%s
\n
"
,
__func__
);
if
(
!
IS_ARCH
_WRPC
()
)
/* Optimization for WRPC target : Just one port */
{
if
(
!
ARCH_IS
_WRPC
()
)
/* Optimization for WRPC target : Just one port */
{
for
(
i
=
1
;
i
<
ppg
->
defaultDS
->
numberPorts
;
i
++
)
{
ppi_best
=
INST
(
ppg
,
best
);
...
...
@@ -1408,7 +1408,7 @@ int bmc(struct pp_instance *ppi)
}
/* Only if port is not any port is in the INITIALIZING state 9.2.6.8 */
if
(
!
IS_ARCH
_WRPC
()
&&
bmc_any_port_initializing
(
ppg
))
{
if
(
!
ARCH_IS
_WRPC
()
&&
bmc_any_port_initializing
(
ppg
))
{
pp_diag
(
ppi
,
bmc
,
2
,
"A Port is in initializing
\n
"
);
return
ppi
->
state
;
}
...
...
@@ -1416,7 +1416,7 @@ int bmc(struct pp_instance *ppi)
/* Calculate Erbest of all ports Figure 25 */
bmc_update_erbest
(
ppg
);
if
(
!
IS_ARCH
_WRPC
()
&&
DSDEF
(
ppi
)
->
numberPorts
>
1
)
{
if
(
!
ARCH_IS
_WRPC
()
&&
DSDEF
(
ppi
)
->
numberPorts
>
1
)
{
ret
=
bmc_check_frgn_master
(
ppi
);
}
...
...
proto-standard/common-fun.c
View file @
8277da4a
...
...
@@ -10,12 +10,6 @@
#include "../lib/network_types.h"
#include "../proto-ext-whiterabbit/wr-api.h"
/* FIXME: phase_to_cf_units */
#ifdef CONFIG_ARCH_WRS
#define ARCH_IS_WRS 1
#else
#define ARCH_IS_WRS 0
#endif
void
*
msg_copy_header
(
MsgHeader
*
dest
,
MsgHeader
*
src
)
{
return
memcpy
(
dest
,
src
,
sizeof
(
MsgHeader
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment