summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_bitops.h
AgeCommit message (Collapse)AuthorFilesLines
2020-07-14include: sbi_bitops: Remove dead shift assignment in ffs/flsTobias Klauser1-6/+2
The value assigned to x by the shift assignment in the last if block of ffs/fls is never read. Remove it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-03-10lib: sbi: Fix coding style issuesBin Meng1-7/+7
This fixes various coding style issues found in the SBI codes. No functional changes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-03-08include: sbi_bitops: More useful bit operationsAnup Patel1-2/+139
This patch extends our bit operation library with mechanism to: 1. Iteratively traverse bits 2. Set bit 3. Clear bit 4. Change bit 5. ... other helpful functions ... Most the above is adopted from Xvisor sources. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-03-08include: Move bits related defines and macros to sbi_bitops.hAnup Patel1-2/+17
The right location for all bits related defines and macros is sbi_bitops.h hence this patch. With this patch, the sbi_bits.h is redundant so we remove it. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-12-23lib: Add IPI extension in SBIAtish Patra1-0/+74
This patch adds new IPI extension which replaces ipi related v0.1 extensions. This also adds a new API for ipi sending as trap handling is not necessary in v0.2 SBI IPI related extensions. It also modifies the IPI sending code which now accepts hart mask as a value instead of S-mode virtual address. Thus, the caller should set it to exact hart mask value everytime. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2019-04-24all: run clang-format and update checked-in filesOlof Johansson1-1/+1
Noisy commit, no functional changes. Generated with an current upstream clang-format and: clang-format -i $(find . -name \*.[ch]) Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-24all: Update copyright header in all filesAnup patel1-3/+3
This patch updates copyright header in all files as follows: 1. Makes "SPDX-License-Identifier: BSD-2-Clause" as first line 2. Change copyright year to 2019 for Western Digital Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-01-22lib: Add atomic bit set/clear operations.Atish Patra1-0/+98
Add addtional functionlities for set/clear bits atomically. Signed-off-by: Atish Patra <atish.patra@wdc.com>