Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
advLigoRTS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CDS
software
advLigoRTS
Commits
aecd6b0a
Commit
aecd6b0a
authored
5 years ago
by
Rolf Bork
Browse files
Options
Downloads
Patches
Plain Diff
Switch Dolphin to latest driver in pcie_switch.
parent
e310fca1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pcie_switch/kmod/Makefile
+1
-1
1 addition, 1 deletion
src/pcie_switch/kmod/Makefile
src/pcie_switch/kmod/cdsrfmswitch.c
+28
-30
28 additions, 30 deletions
src/pcie_switch/kmod/cdsrfmswitch.c
with
29 additions
and
31 deletions
src/pcie_switch/kmod/Makefile
+
1
−
1
View file @
aecd6b0a
...
...
@@ -2,7 +2,7 @@ KBUILD_EXTRA_SYMBOLS=/opt/rtcds/rtscore/trunk/src/drv/ExtraSymbols.symvers
EXTRA_CFLAGS
+=
-O3
DISDIR
=
/opt/srcdis
EXTRA_CFLAGS
+=
-DOS_IS_LINUX
=
1
-D_KERNEL
=
1
-I
$(
DISDIR
)
/src/IRM_GX/drv/src
-I
$(
DISDIR
)
/src/IRM_GX/drv/src/LINUX
-I
$(
DISDIR
)
/src/include
-I
$(
DISDIR
)
/src/include/dis
-I
$(
DISDIR
)
/src/COMMON/osif/kernel/include
-I
$(
DISDIR
)
/src/COMMON/osif/kernel/include/LINUX
-DDOLPHIN_TEST
=
1
-DDIS_BROADCAST
=
0x80000000
EXTRA_CFLAGS
+=
-DOS_IS_LINUX
=
1
-D_
DIS_
KERNEL
_
=
1
-I
$(
DISDIR
)
/src/IRM_GX/drv/src
-I
$(
DISDIR
)
/src/IRM_GX/drv/src/LINUX
-I
$(
DISDIR
)
/src/include
-I
$(
DISDIR
)
/src/include/dis
-I
$(
DISDIR
)
/src/COMMON/osif/kernel/include
-I
$(
DISDIR
)
/src/COMMON/osif/kernel/include/LINUX
-DDOLPHIN_TEST
=
1
-DDIS_BROADCAST
=
0x80000000
obj-m
+=
cdsrfmswitch.o
...
...
This diff is collapsed.
Click to expand it.
src/pcie_switch/kmod/cdsrfmswitch.c
+
28
−
30
View file @
aecd6b0a
...
...
@@ -13,8 +13,6 @@
#include
<linux/slab.h>
#include
<linux/delay.h>
#include
<linux/string.h>
#include
</usr/src/linux/arch/x86/include/asm/processor.h>
#include
</usr/src/linux/arch/x86/include/asm/cacheflush.h>
#include
<linux/timer.h>
#include
<linux/ctype.h>
...
...
@@ -76,7 +74,7 @@ static int mysysstatus;
//
//
// ************************************************************************
inline
unsigned
long
current_time
(
void
)
{
inline
unsigned
long
my_
current_time
(
void
)
{
// ************************************************************************
struct
timespec
t
;
extern
struct
timespec
current_kernel_time
(
void
);
...
...
@@ -133,7 +131,7 @@ int monitorActiveConnections(void *data)
}
// Get current GPS time
// Sent to EPICS as indicator switch code running
mycounter
[
9
]
=
current_time
();
mycounter
[
9
]
=
my_
current_time
();
// Check traffic for all data xfer threads
// and set thread status bits.
swstatus
=
0
;
...
...
@@ -310,13 +308,13 @@ void *copyRfmDataEY2CS1(void *arg)
// ************************************************************************
// Following 3 routines are required Dolphin connection callbacks.
// ************************************************************************
signed32
session_callback
(
session_cb_arg_t
IN
arg
,
int32_t
session_callback
(
session_cb_arg_t
IN
arg
,
session_cb_reason_t
IN
reason
,
session_cb_status_t
IN
status
,
u
nsigned32
IN
target_node
,
u
nsigned32
IN
local_adapter_number
)
{
u
int32_t
IN
target_node
,
u
int32_t
IN
local_adapter_number
)
{
// ************************************************************************
printk
l
(
"Session callback reason=%d status=%d target_node=%d
\n
"
,
reason
,
status
,
target_node
);
printk
(
"Session callback reason=%d status=%d target_node=%d
\n
"
,
reason
,
status
,
target_node
);
// if (reason == SR_OK) iop_rfm_valid = 1;
// This is being called when the one of the other nodes is prepared for shutdown
// :TODO: may need to check target_node == <our local node>
...
...
@@ -325,22 +323,22 @@ signed32 session_callback(session_cb_arg_t IN arg,
}
// ************************************************************************
signed32
connect_callback
(
void
IN
*
arg
,
int32_t
connect_callback
(
void
IN
*
arg
,
sci_r_segment_handle_t
IN
remote_segment_handle
,
u
nsigned32
IN
reason
,
u
nsigned32
IN
status
)
{
u
int32_t
IN
reason
,
u
int32_t
IN
status
)
{
// ************************************************************************
printk
l
(
"Connect callback reason=%d status=%d
\n
"
,
reason
,
status
);
printk
(
"Connect callback reason=%d status=%d
\n
"
,
reason
,
status
);
return
0
;
}
// ************************************************************************
signed32
create_segment_callback
(
void
IN
*
arg
,
int32_t
create_segment_callback
(
void
IN
*
arg
,
sci_l_segment_handle_t
IN
local_segment_handle
,
u
nsigned32
IN
reason
,
u
nsigned32
IN
source_node
,
u
nsigned32
IN
local_adapter_number
)
{
u
int32_t
IN
reason
,
u
int32_t
IN
source_node
,
u
int32_t
IN
local_adapter_number
)
{
// ************************************************************************
printk
l
(
"Create segment callback reason=%d source_node=%d
\n
"
,
reason
,
source_node
);
printk
(
"Create segment callback reason=%d source_node=%d
\n
"
,
reason
,
source_node
);
return
0
;
}
...
...
@@ -502,7 +500,7 @@ int cdsrfm_proc_open(struct inode *sp_inode,struct file *sp_file) {
// ************************************************************************
// printk("proc called open \n");
read_p
=
1
;
message
=
kmalloc
(
sizeof
(
char
)
*
128
,
__GFP_
W
AI
T
|
__GFP_IO
|
__GFP_FS
);
message
=
kmalloc
(
sizeof
(
char
)
*
128
,
__GFP_
RECL
AI
M
|
__GFP_IO
|
__GFP_FS
);
if
(
message
==
NULL
)
{
printk
(
"ERROR counter proc open
\n
"
);
return
-
ENOMEM
;
...
...
@@ -594,25 +592,25 @@ static int __init lr_switch_init(void)
// Starting data switching threads *****************************************************
// Start thread which moves data for RFM0 IPC channels 0 - 31
printk
(
"Shutting down CPU 3 at %ld
\n
"
,
current_time
());
printk
(
"Shutting down CPU 3 at %ld
\n
"
,
my_
current_time
());
set_fe_code_idle
(
copyRfmDataEX2CS0
,
3
);
msleep
(
100
);
cpu_down
(
3
);
// Start thread which moves data for RFM0 IPC channels 32 -63
printk
(
"Shutting down CPU 4 at %ld
\n
"
,
current_time
());
printk
(
"Shutting down CPU 4 at %ld
\n
"
,
my_
current_time
());
set_fe_code_idle
(
copyRfmDataEX2CS1
,
4
);
msleep
(
100
);
cpu_down
(
4
);
// Start thread which moves data for RFM1 IPC channels 0 - 31
printk
(
"Shutting down CPU 5 at %ld
\n
"
,
current_time
());
printk
(
"Shutting down CPU 5 at %ld
\n
"
,
my_
current_time
());
set_fe_code_idle
(
copyRfmDataEY2CS0
,
5
);
msleep
(
100
);
cpu_down
(
5
);
// Start thread which moves data for RFM1 IPC channels 32 - 63
printk
(
"Shutting down CPU 6 at %ld
\n
"
,
current_time
());
printk
(
"Shutting down CPU 6 at %ld
\n
"
,
my_
current_time
());
set_fe_code_idle
(
copyRfmDataEY2CS1
,
6
);
msleep
(
100
);
cpu_down
(
6
);
...
...
@@ -639,7 +637,7 @@ static void __exit lr_switch_exit(void)
// ************************************************************************
{
int
ret
;
extern
int
__cpuinit
cpu_up
(
unsigned
int
cpu
);
extern
int
cpu_up
(
unsigned
int
cpu
);
printk
(
KERN_INFO
"Goodbye, cdsrfmswitch 3 is shutting down
\n
"
);
// Stop the Active Channel monitor thread
...
...
@@ -665,31 +663,31 @@ static void __exit lr_switch_exit(void)
// Bring CPU 3 back on line
set_fe_code_idle
(
0
,
3
);
printk
l
(
"Will bring back CPU %d
\n
"
,
3
);
printk
(
"Will bring back CPU %d
\n
"
,
3
);
msleep
(
1000
);
cpu_up
(
3
);
printk
l
(
"Brought CPU 3 back up
\n
"
);
printk
(
"Brought CPU 3 back up
\n
"
);
// Bring CPU 4 back on line
set_fe_code_idle
(
0
,
4
);
printk
l
(
"Will bring back CPU %d
\n
"
,
4
);
printk
(
"Will bring back CPU %d
\n
"
,
4
);
msleep
(
1000
);
cpu_up
(
4
);
printk
l
(
"Brought CPU 4 back up
\n
"
);
printk
(
"Brought CPU 4 back up
\n
"
);
// Bring CPU 5 back on line
set_fe_code_idle
(
0
,
5
);
printk
l
(
"Will bring back CPU %d
\n
"
,
5
);
printk
(
"Will bring back CPU %d
\n
"
,
5
);
msleep
(
1000
);
cpu_up
(
5
);
printk
l
(
"Brought CPU 5 back up
\n
"
);
printk
(
"Brought CPU 5 back up
\n
"
);
// Bring CPU 6 back on line
set_fe_code_idle
(
0
,
6
);
printk
l
(
"Will bring back CPU %d
\n
"
,
6
);
printk
(
"Will bring back CPU %d
\n
"
,
6
);
msleep
(
1000
);
cpu_up
(
6
);
printk
l
(
"Brought CPU 6 back up
\n
"
);
printk
(
"Brought CPU 6 back up
\n
"
);
msleep
(
1000
);
// Remove /proc file entries
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment