-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have all the new compound accessors be written in terms of the simple ones and fix how CSR_ACCCESORS_DEFINED can be used to override the simple ones but keep the definitions of the other ones around. This *should* also also fix incorrect multiple accesses done by 64-bit CPUs to 32-bit CSR busses, and make the accessors not depend on CONFIG_CSR_ALIGNMENT being the same as sizeof(unsigned long)*8 In addition, the generated csr.h now will include system.h always when with_access_functions is True. This guarantees that the higher level accessors are defined. The extern prototypes for the simple accessors when CSR_ACCCESORS_DEFINED are removed and system.h is responsible for providing them. It is also added to hw/common.h This allows system.h to set CSR_ACCCESORS_DEFINED when necessary, in which case it's responsible for both declaring and defining the simple accessors. That way, it can make them inline rather than forcing them to be extern which at least on microwatt saves spaces. One can continue to use -DCSR_ACCCESORS_DEFINED but in that case a system.h will have to be provided with at least the extern definitions. Signed-off-by: Benjamin Herrenschmidt <[email protected]>
- Loading branch information
Showing
2 changed files
with
45 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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 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