cregit-Linux how code gets into the kernel

Release 4.14 arch/sh/include/asm/sram.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_SRAM_H

#define __ASM_SRAM_H

#ifdef CONFIG_HAVE_SRAM_POOL

#include <linux/spinlock.h>
#include <linux/genalloc.h>

/* arch/sh/mm/sram.c */
extern struct gen_pool *sram_pool;


static inline unsigned long sram_alloc(size_t len) { if (!sram_pool) return 0UL; return gen_pool_alloc(sram_pool, len); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt27100.00%1100.00%
Total27100.00%1100.00%


static inline void sram_free(unsigned long addr, size_t len) { return gen_pool_free(sram_pool, addr, len); }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt24100.00%1100.00%
Total24100.00%1100.00%

#else
static inline unsigned long sram_alloc(size_t len) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt14100.00%1100.00%
Total14100.00%1100.00%


static inline void sram_free(unsigned long addr, size_t len) { }

Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt13100.00%1100.00%
Total13100.00%1100.00%

#endif /* CONFIG_HAVE_SRAM_POOL */ #endif /* __ASM_SRAM_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Paul Mundt10899.08%150.00%
Greg Kroah-Hartman10.92%150.00%
Total109100.00%2100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.