type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void iwl_mvm_check_ratid_empty(struct iwl_mvm *mvm,
struct ieee80211_sta *sta, u8 tid)
{
struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv;
struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid];
struct ieee80211_vif *vif = mvmsta->vif;
lockdep_assert_held(&mvmsta->lock);
if (tid_data->ssn != tid_... |
functions | void iwl_mvm_hwrate_to_tx_control(u32 rate_n_flags,
struct ieee80211_tx_info *info)
{
struct ieee80211_tx_rate *r = &info->status.rates[0];
info->status.antenna =
((rate_n_flags & RATE_MCS_ANT_ABC_MSK) >> RATE_MCS_ANT_POS);
if (rate_n_flags & RATE_HT_MCS_GF_MSK)
r->flags |= IEEE80211_TX_RC_GREEN_FIELD;
s... |
functions | else if (rate_n_flags & RATE_MCS_VHT_MSK) {
ieee80211_rate_set_vht(
r, rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK,
((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >>
RATE_VHT_MCS_NSS_POS) + 1);
r->flags |= IEEE80211_TX_RC_VHT_MCS;
} |
functions | void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
struct iwl_rx_packet *pkt)
{
struct ieee80211_sta *sta;
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
int txq_id = SEQ_TO_QUEUE(sequence);
struct iwl_mvm_tx_resp *tx_resp = (void *)pkt->data;
int sta_id = IWL_MVM_TX_RES_GET_RA(tx_resp->ra_tid);
int tid ... |
functions | else if (!mvmsta) {
/* Tx response without STA, so we are draining */
set_bit(sta_id, mvm->sta_drained);
schedule_work(&mvm->sta_drained_wk);
} |
functions | void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
struct iwl_rx_packet *pkt)
{
struct iwl_mvm_tx_resp *tx_resp = (void *)pkt->data;
struct agg_tx_status *frame_status = &tx_resp->status;
int i;
for (i = 0; i < tx_resp->frame_count; i++) {
u16 fstatus = le16_to_cpu(frame_status[i].status);
IWL_DEBU... |
functions | void iwl_mvm_rx_tx_cmd_agg_dbg(struct iwl_mvm *mvm,
struct iwl_rx_packet *pkt)
{} |
functions | void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm,
struct iwl_rx_packet *pkt)
{
struct iwl_mvm_tx_resp *tx_resp = (void *)pkt->data;
int sta_id = IWL_MVM_TX_RES_GET_RA(tx_resp->ra_tid);
int tid = IWL_MVM_TX_RES_GET_TID(tx_resp->ra_tid);
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
struct ieee80211_sta *sta;
... |
functions | int iwl_mvm_rx_tx_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
struct iwl_device_cmd *cmd)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_mvm_tx_resp *tx_resp = (void *)pkt->data;
if (tx_resp->frame_count == 1)
iwl_mvm_rx_tx_cmd_single(mvm, pkt);
else
iwl_mvm_rx_tx_cmd_agg(mvm, pkt)... |
functions | int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
struct iwl_device_cmd *cmd)
{
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_mvm_ba_notif *ba_notif = (void *)pkt->data;
struct sk_buff_head reclaimed_skbs;
struct iwl_mvm_tid_data *tid_data;
struct ieee80211_sta *sta;
struct iw... |
functions | int iwl_mvm_flush_tx_path(struct iwl_mvm *mvm, u32 tfd_msk, bool sync)
{
int ret;
struct iwl_tx_path_flush_cmd flush_cmd = {
.queues_ctl = cpu_to_le32(tfd_msk),
.flush_ctl = cpu_to_le16(DUMP_TX_FIFO_FLUSH),
} |
includes |
#include <linux/pagemap.h> |
includes | #include <linux/sched.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/math64.h> |
defines |
#define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8) |
defines | #define MAX_CACHE_BYTES_PER_GIG (32 * 1024) |
functions | int create_free_space_inode(struct btrfs_root *root,
struct btrfs_trans_handle *trans,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path)
{
struct btrfs_key key;
struct btrfs_disk_key disk_key;
struct btrfs_free_space_header *header;
struct btrfs_inode_item *inode_item;
stru... |
functions | int btrfs_truncate_free_space_cache(struct btrfs_root *root,
struct btrfs_trans_handle *trans,
struct btrfs_path *path,
struct inode *inode)
{
loff_t oldsize;
int ret = 0;
trans->block_rsv = root->orphan_block_rsv;
ret = btrfs_block_rsv_check(trans, root,
root->orphan_block_rsv,
... |
functions | int readahead_cache(struct inode *inode)
{
struct file_ra_state *ra;
unsigned long last_index;
ra = kzalloc(sizeof(*ra), GFP_NOFS);
if (!ra)
return -ENOMEM;
file_ra_state_init(ra, inode->i_mapping);
last_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT;
page_cache_sync_readahead(inode->i_mapping, ra, NU... |
functions | int load_free_space_cache(struct btrfs_fs_info *fs_info,
struct btrfs_block_group_cache *block_group)
{
struct btrfs_root *root = fs_info->tree_root;
struct inode *inode;
struct btrfs_free_space_header *header;
struct extent_buffer *leaf;
struct page *page;
struct btrfs_path *path;
u32 *checksums = NULL, *c... |
functions | int btrfs_write_out_cache(struct btrfs_root *root,
struct btrfs_trans_handle *trans,
struct btrfs_block_group_cache *block_group,
struct btrfs_path *path)
{
struct btrfs_free_space_header *header;
struct extent_buffer *leaf;
struct inode *inode;
struct rb_node *node;
struct list_head *pos, *n;
stru... |
functions | long offset_to_bit(u64 bitmap_start, u64 sectorsize,
u64 offset)
{
BUG_ON(offset < bitmap_start);
offset -= bitmap_start;
return (unsigned long)(div64_u64(offset, sectorsize));
} |
functions | long bytes_to_bits(u64 bytes, u64 sectorsize)
{
return (unsigned long)(div64_u64(bytes, sectorsize));
} |
functions | u64 offset_to_bitmap(struct btrfs_block_group_cache *block_group,
u64 offset)
{
u64 bitmap_start;
u64 bytes_per_bitmap;
bytes_per_bitmap = BITS_PER_BITMAP * block_group->sectorsize;
bitmap_start = offset - block_group->key.objectid;
bitmap_start = div64_u64(bitmap_start, bytes_per_bitmap);
bitmap_start *=... |
functions | int tree_insert_offset(struct rb_root *root, u64 offset,
struct rb_node *node, int bitmap)
{
struct rb_node **p = &root->rb_node;
struct rb_node *parent = NULL;
struct btrfs_free_space *info;
while (*p) {
parent = *p;
info = rb_entry(parent, struct btrfs_free_space, offset_index);
if (offset < info... |
functions | else if (offset > info->offset) {
p = &(*p)->rb_right;
} |
functions | else if (entry) {
if (entry->bitmap) {
/*
* if previous extent entry covers the offset,
* we should return it instead of the bitmap entry
*/
n = &entry->offset_index;
while (1) {
n = rb_prev(n);
if (!n)
break;
prev = rb_entry(n, struct btrfs_free_space,
offset_index);
i... |
functions | void
__unlink_free_space(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info)
{
rb_erase(&info->offset_index, &block_group->free_space_offset);
block_group->free_extents--;
} |
functions | void unlink_free_space(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info)
{
__unlink_free_space(block_group, info);
block_group->free_space -= info->bytes;
} |
functions | int link_free_space(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info)
{
int ret = 0;
BUG_ON(!info->bitmap && !info->bytes);
ret = tree_insert_offset(&block_group->free_space_offset, info->offset,
&info->offset_index, (info->bitmap != NULL));
if (ret)
return ret;
block_group... |
functions | void recalculate_thresholds(struct btrfs_block_group_cache *block_group)
{
u64 max_bytes;
u64 bitmap_bytes;
u64 extent_bytes;
u64 size = block_group->key.offset;
/*
* The goal is to keep the total amount of memory used per 1gb of space
* at or below 32k, so we need to adjust how much memory we allow to be
*... |
functions | void bitmap_clear_bits(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info, u64 offset,
u64 bytes)
{
unsigned long start, end;
unsigned long i;
start = offset_to_bit(info->offset, block_group->sectorsize, offset);
end = start + bytes_to_bits(bytes, block_group->sectorsize);... |
functions | void bitmap_set_bits(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info, u64 offset,
u64 bytes)
{
unsigned long start, end;
unsigned long i;
start = offset_to_bit(info->offset, block_group->sectorsize, offset);
end = start + bytes_to_bits(bytes, block_group->sectorsize);
BUG_... |
functions | int search_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *bitmap_info, u64 *offset,
u64 *bytes)
{
unsigned long found_bits = 0;
unsigned long bits, i;
unsigned long next_zero;
i = offset_to_bit(bitmap_info->offset, block_group->sectorsize,
max_t(u64, *offset, bitmap_info-... |
functions | void add_new_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info, u64 offset)
{
u64 bytes_per_bg = BITS_PER_BITMAP * block_group->sectorsize;
int max_bitmaps = (int)div64_u64(block_group->key.offset +
bytes_per_bg - 1, bytes_per_bg);
BUG_ON(block_group->total_bitmaps >= max_... |
functions | void free_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *bitmap_info)
{
unlink_free_space(block_group, bitmap_info);
kfree(bitmap_info->bitmap);
kmem_cache_free(btrfs_free_space_cachep, bitmap_info);
block_group->total_bitmaps--;
recalculate_thresholds(block_group);
} |
functions | int remove_from_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *bitmap_info,
u64 *offset, u64 *bytes)
{
u64 end;
u64 search_start, search_bytes;
int ret;
again:
end = bitmap_info->offset +
(u64)(BITS_PER_BITMAP * block_group->sectorsize) - 1;
/*
* XXX - this can... |
functions | else if (*offset >= bitmap_info->offset && *offset + *bytes <= end) {
bitmap_clear_bits(block_group, bitmap_info, *offset, *bytes);
*bytes = 0;
} |
functions | int insert_into_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info)
{
struct btrfs_free_space *bitmap_info;
int added = 0;
u64 bytes, offset, end;
int ret;
/*
* If we are below the extents threshold then we can add this as an
* extent, and don't have to deal with the bi... |
functions | else if (offset >= bitmap_info->offset && offset + bytes <= end) {
bitmap_set_bits(block_group, bitmap_info, offset, bytes);
bytes = 0;
} |
functions | bool try_merge_free_space(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *info, bool update_stat)
{
struct btrfs_free_space *left_info;
struct btrfs_free_space *right_info;
bool merged = false;
u64 offset = info->offset;
u64 bytes = info->bytes;
/*
* first we want to see if there is ... |
functions | int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
u64 offset, u64 bytes)
{
struct btrfs_free_space *info;
int ret = 0;
info = kmem_cache_zalloc(btrfs_free_space_cachep, GFP_NOFS);
if (!info)
return -ENOMEM;
info->offset = offset;
info->bytes = bytes;
spin_lock(&block_group->tree_lock... |
functions | else if (ret) {
ret = 0;
goto out;
} |
functions | int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
u64 offset, u64 bytes)
{
struct btrfs_free_space *info;
struct btrfs_free_space *next_info = NULL;
int ret = 0;
spin_lock(&block_group->tree_lock);
again:
info = tree_search_offset(block_group, offset, 0, 0);
if (!info) {
/*
* ... |
functions | void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
u64 bytes)
{
struct btrfs_free_space *info;
struct rb_node *n;
int count = 0;
for (n = rb_first(&block_group->free_space_offset); n; n = rb_next(n)) {
info = rb_entry(n, struct btrfs_free_space, offset_index);
if (info->bytes >= byte... |
functions | int
__btrfs_return_cluster_to_free_space(
struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster)
{
struct btrfs_free_space *entry;
struct rb_node *node;
spin_lock(&cluster->lock);
if (cluster->block_group != block_group)
goto out;
cluster->block_group = NULL;
cluster-... |
functions | void btrfs_remove_free_space_cache(struct btrfs_block_group_cache *block_group)
{
struct btrfs_free_space *info;
struct rb_node *node;
struct btrfs_free_cluster *cluster;
struct list_head *head;
spin_lock(&block_group->tree_lock);
while ((head = block_group->cluster_list.next) !=
&block_group->cluster_li... |
functions | u64 btrfs_find_space_for_alloc(struct btrfs_block_group_cache *block_group,
u64 offset, u64 bytes, u64 empty_size)
{
struct btrfs_free_space *entry = NULL;
u64 bytes_search = bytes + empty_size;
u64 ret = 0;
spin_lock(&block_group->tree_lock);
entry = find_free_space(block_group, &offset, &bytes_search,... |
functions | int btrfs_return_cluster_to_free_space(
struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster)
{
int ret;
/* first, get a safe pointer to the block group */
spin_lock(&cluster->lock);
if (!block_group) {
block_group = cluster->block_group;
if (!block_group) {
sp... |
functions | else if (cluster->block_group != block_group) {
/* someone else has already freed it don't redo their work */
spin_unlock(&cluster->lock);
return 0;
} |
functions | u64 btrfs_alloc_from_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster,
struct btrfs_free_space *entry,
u64 bytes, u64 min_start)
{
int err;
u64 search_start = cluster->window_start;
u64 search_bytes = bytes;
u64 ret = 0;
search_start = min_start;
search_... |
functions | u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster, u64 bytes,
u64 min_start)
{
struct btrfs_free_space *entry = NULL;
struct rb_node *node;
u64 ret = 0;
spin_lock(&cluster->lock);
if (bytes > cluster->max_size)
goto out;
if (cluster->b... |
functions | int btrfs_bitmap_cluster(struct btrfs_block_group_cache *block_group,
struct btrfs_free_space *entry,
struct btrfs_free_cluster *cluster,
u64 offset, u64 bytes, u64 min_bytes)
{
unsigned long next_zero;
unsigned long i;
unsigned long search_bits;
unsigned long total_bits;
unsigned long found_bits;
uns... |
functions | int setup_cluster_no_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster,
u64 offset, u64 bytes, u64 min_bytes)
{
struct btrfs_free_space *first = NULL;
struct btrfs_free_space *entry = NULL;
struct btrfs_free_space *prev = NULL;
struct btrfs_free_space *last;
struc... |
functions | int setup_cluster_bitmap(struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster,
u64 offset, u64 bytes, u64 min_bytes)
{
struct btrfs_free_space *entry;
struct rb_node *node;
int ret = -ENOSPC;
if (block_group->total_bitmaps == 0)
return -ENOSPC;
entry = tree_search_offset(bloc... |
functions | int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster,
u64 offset, u64 bytes, u64 empty_size)
{
u64 min_bytes;
int ret;
/* for metadata, allow allocates with more holes *... |
functions | else if (block_group->flags & BTRFS_BLOCK_GROUP_METADATA) {
/*
* we want to do larger allocations when we are
* flushing out the delayed refs, it helps prevent
* making more work as we go along.
*/
if (trans->transaction->delayed_refs.flushing)
min_bytes = max(bytes, (bytes + empty_size) >> 1);
els... |
functions | void btrfs_init_free_cluster(struct btrfs_free_cluster *cluster)
{
spin_lock_init(&cluster->lock);
spin_lock_init(&cluster->refill_lock);
cluster->root = RB_ROOT;
cluster->max_size = 0;
INIT_LIST_HEAD(&cluster->block_group_list);
cluster->block_group = NULL;
} |
functions | int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group,
u64 *trimmed, u64 start, u64 end, u64 minlen)
{
struct btrfs_free_space *entry = NULL;
struct btrfs_fs_info *fs_info = block_group->fs_info;
u64 bytes = 0;
u64 actually_trimmed;
int ret = 0;
*trimmed = 0;
while (start < end) {
spin... |
includes | #include <common.h> |
includes | #include <linux/mtd/nand.h> |
defines | #define __NANDSTR(str) str |
defines | #define __NANDSTR(str) "" |
defines | #define LP_OPTIONS (NAND_SAMSUNG_LP_OPTIONS | NAND_NO_READRDY | NAND_NO_AUTOINCR) |
defines | #define LP_OPTIONS16 (LP_OPTIONS | NAND_BUSWIDTH_16) |
includes | #include <stdio.h> |
functions | raw_err coreio_open_device(const uint8* file)
{
if(file == NULL)
return ERR_NULLPTR;
if(open_fs != NULL)
fclose(open_fs);
if((open_fs = fopen(file, "r+")) == NULL)
return ERR_IO;
return SUCCESS;
} |
functions | raw_err coreio_close_device()
{
if(open_fs == NULL)
return SUCCESS;
fclose(open_fs);
open_fs = NULL;
return SUCCESS;
} |
functions | uint32 coreio_read_block(void* data, uint32 block_qty, uint32 block_id)
{
#ifdef FS_DEBUG_ON
printf("In function coreio_read_block: \n");
#endif
coreio_fseek(open_fs, block_id * BLOCK_SIZE, SEEK_SET);
return (coreio_fread(data, BLOCK_SIZE, block_qty * BLOCK_SIZE, open_fs) / (BLOCK_SIZE + 1));
} |
functions | uint32 coreio_write_block(const void* data, uint32 d_size, uint32 block_id)
{
uint32 written_blks = 0;
uint32 written_bytes = 0;
#ifdef FS_DEBUG_ON
printf("In function coreio_write_block: \n");
#endif
coreio_fseek(open_fs, block_id * BLOCK_SIZE, SEEK_SET);
written_bytes = coreio_fwrite(data, d_size, 1, open... |
functions | uint32 coreio_fread(void* ptr, uint32 size, uint32 nmemb, FILE* stream)
{
return fread(ptr, size, nmemb, stream);
} |
functions | uint32 coreio_fwrite(const void* ptr, uint32 size, uint32 nmemb, FILE* stream)
{
return fwrite(ptr, size, nmemb, stream);
} |
functions | uint32 coreio_fseek(FILE* stream, long offset, uint32 whence)
{
return fseek(stream, offset, whence);
} |
functions | void coreio_rewind(FILE* stream)
{
rewind(stream);
return;
} |
functions | uint32 coreio_ftell(FILE* stream)
{
return ftell(stream);
} |
functions | SINT32 SEC_VDEC_Init(UINT32 Args, UINT32 Share)
{
SINT32 ret = VDEC_ERR;
VDEC_OPERATION_S *pParam = NULL;
ret = SEC_ShareZone_Init(Share);
if (ret != VDEC_OK)
{
dprint(PRN_FATAL, "%s %d, SEC_ShareZone_Init failed!\n", __func__,__LINE__);
return VDEC_ERR;
} |
functions | SINT32 SEC_VDEC_Exit(UINT32 IsSecure)
{
SINT32 ret = VDEC_ERR;
ret = VDEC_Exit(IsSecure);
SEC_ShareZone_Exit();
return ret;
} |
functions | SINT32 SEC_VDEC_Suspend(VOID)
{
return VDEC_Suspend();
} |
functions | SINT32 SEC_VDEC_Resume(VOID)
{
return VDEC_Resume();
} |
functions | SINT32 SEC_VDEC_Control(SINT32 ChanID, UINT32 eCmdID, UINT32 Args, UINT32 ArgLen)
{
SINT32 ret = VDEC_ERR;
UINT8 MapFlag = 0;
VOID *pParam = NULL;
if (Args != 0 && ArgLen != 0)
{
pParam = (VOID *)SOS_MapShare(Args, ArgLen, 1, 1);
if (NULL == pParam)
{
... |
functions | SINT32 SEC_VDEC_RunProcess(UINT32 Args, UINT32 ArgLen)
{
return VCTRL_RunProcess();
} |
functions | SINT32 SEC_VDEC_GetChanImage(SINT32 ChanID, UINT32 Image)
{
SINT32 ret = VDEC_ERR;
IMAGE *pImage = NULL;
pImage = (IMAGE *)SOS_MapShare(Image, sizeof(IMAGE), 1, 1);
if (pImage != NULL)
{
ret = VCTRL_GetChanImage(ChanID, pImage);
SOS_UnMapShare((VOID *)pImage, sizeof(IMA... |
functions | SINT32 SEC_VDEC_ReleaseChanImage(SINT32 ChanID, UINT32 Image)
{
SINT32 ret = VDEC_ERR;
IMAGE *pImage = NULL;
pImage = (IMAGE *)SOS_MapShare(Image, sizeof(IMAGE), 1, 1);
if (pImage != NULL)
{
ret = VCTRL_ReleaseChanImage(ChanID, pImage);
SOS_UnMapShare((VOID *)pImage, si... |
functions | SINT32 SEC_VDEC_ReadProc(UINT32 Page, SINT32 Count)
{
SINT32 ret = VDEC_ERR;
SINT8 *pParam = NULL;
pParam = SOS_MapShare(Page, MAX_PROC_SIZE, 1, 1);
if (pParam != NULL)
{
ret = SEC_ReadProc(pParam, Count);
SOS_UnMapShare((VOID *)pParam, MAX_PROC_SIZE);
} |
functions | SINT32 SEC_VDEC_WriteProc(UINT32 Option, SINT32 Value)
{
return SEC_WriteProc(Option, Value);
} |
includes |
#include <linux/module.h> |
includes | #include <linux/init.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/errno.h> |
includes | #include <linux/leds.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/of_device.h> |
includes | #include <linux/spmi.h> |
includes | #include <linux/err.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/of.h> |
includes | #include <linux/regulator/consumer.h> |
includes | #include <linux/workqueue.h> |
includes | #include <linux/power_supply.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.