-
Notifications
You must be signed in to change notification settings - Fork 906
add support for riscv64 timer #13324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
heyujiao99
wants to merge
2
commits into
open-mpi:main
Choose a base branch
from
heyujiao99:riscv64
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana | ||
bosilca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# University Research and Technology | ||
# Corporation. All rights reserved. | ||
# Copyright (c) 2004-2005 The University of Tennessee and The University | ||
# of Tennessee Research Foundation. All rights | ||
# reserved. | ||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, | ||
# University of Stuttgart. All rights reserved. | ||
# Copyright (c) 2004-2005 The Regents of the University of California. | ||
# All rights reserved. | ||
# Copyright (c) 2017 Research Organization for Information Science | ||
# and Technology (RIST). All rights reserved. | ||
# $COPYRIGHT$ | ||
# | ||
# Additional copyrights may follow | ||
# | ||
# $HEADER$ | ||
# | ||
|
||
# This makefile.am does not stand on its own - it is included from opal/include/Makefile.am | ||
|
||
headers += \ | ||
opal/sys/riscv64/timer.h | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | ||
/* | ||
* Copyright (c) 2008 The University of Tennessee and The University | ||
* of Tennessee Research Foundation. All rights | ||
* reserved. | ||
* Copyright (c) 2016 Broadcom Limited. All rights reserved. | ||
* Copyright (c) 2016 Los Alamos National Security, LLC. All rights | ||
* reserved. | ||
* Copyright (c) 2021 Google, LLC. All rights reserved. | ||
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates. | ||
* All Rights reserved. | ||
* $COPYRIGHT$ | ||
* | ||
* Additional copyrights may follow | ||
* | ||
* $HEADER$ | ||
*/ | ||
|
||
#ifndef OPAL_SYS_ARCH_TIMER_H | ||
#define OPAL_SYS_ARCH_TIMER_H 1 | ||
|
||
typedef uint64_t opal_timer_t; | ||
|
||
#if OPAL_C_GCC_INLINE_ASSEMBLY | ||
|
||
static inline opal_timer_t opal_sys_timer_get_cycles(void) | ||
{ | ||
opal_timer_t ret; | ||
__asm__ __volatile__("fence iorw, iorw" ::: "memory"); | ||
__asm__ __volatile__("rdtime %0" : "=r"(ret)); | ||
|
||
return ret; | ||
} | ||
|
||
#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1 | ||
|
||
#endif /* OPAL_C_GCC_INLINE_ASSEMBLY */ | ||
|
||
#endif /* ! OPAL_SYS_ARCH_TIMER_H */ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.