^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * bitext.h: Bit string operations on the sparc, specific to architecture.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright 2002 Pete Zaitcev <zaitcev@yahoo.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifndef _SPARC_BITEXT_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define _SPARC_BITEXT_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/spinlock.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct bit_map {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) spinlock_t lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) unsigned long *map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) int used;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) int last_off;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int last_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) int first_free;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int num_colors;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) int bit_map_string_get(struct bit_map *t, int len, int align);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) void bit_map_clear(struct bit_map *t, int offset, int len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) void bit_map_init(struct bit_map *t, unsigned long *map, int size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #endif /* defined(_SPARC_BITEXT_H) */