-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HV: Add the volatile to avoid optimization for mmio_read/write access
If subsequent write is on the same address, maybe the compiler will optimize the access of MMIO memory and only the last write takes effect.In such case it is wrong. For example: mmio_write_long(0x25, addr); mmio_write_long(0x26, addr); mmio_write_long(0x27, addr); After volatile is added, it can avoid the above possible optimization and assure that each write takes effect. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
- Loading branch information
Showing
1 changed file
with
12 additions
and
12 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