参照元

説明

引数

返り値

参考

実装

/**
 * sg_assign_page - Assign a given page to an SG entry
 * @sg:             SG entry
 * @page:           The page
 *
 * Description:
 *   Assign page to sg entry. Also see sg_set_page(), the most commonly used
 *   variant.
 *
 **/
static inline void sg_assign_page(struct scatterlist *sg, struct page *page)
{
        unsigned long page_link = sg->page_link & 0x3;

        /*
         * In order for the low bit stealing approach to work, pages
         * must be aligned at a 32-bit boundary as a minimum.
         */
        BUG_ON((unsigned long) page & 0x03);
#ifdef CONFIG_DEBUG_SG
        BUG_ON(sg->sg_magic != SG_MAGIC);
        BUG_ON(sg_is_chain(sg));
#endif
        sg->page_link = page_link | (unsigned long) page;
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS