Skip to content

Commit

Permalink
Add memory compatibility wrappers
Browse files Browse the repository at this point in the history
The function vmem_qcache_reap() and global variables 'needfree',
'desfree', and 'lotsfree' are all used in the upstream.  While
these variables have no meaning under Linux they're being defined
as 0's to avoid needing to make additional changes to the ARC code.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Jun 29, 2015
1 parent 3c82160 commit 77ab5dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/sys/vmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ extern void *spl_vmalloc(unsigned long size, gfp_t lflags, pgprot_t prot);
#define vmem_alloc(sz, fl) spl_vmem_alloc((sz), (fl), __func__, __LINE__)
#define vmem_zalloc(sz, fl) spl_vmem_zalloc((sz), (fl), __func__, __LINE__)
#define vmem_free(ptr, sz) spl_vmem_free((ptr), (sz))
#define vmem_qcache_reap(ptr) ((void)0)

extern void *spl_vmem_alloc(size_t sz, int fl, const char *func, int line);
extern void *spl_vmem_zalloc(size_t sz, int fl, const char *func, int line);
Expand Down
3 changes: 3 additions & 0 deletions include/sys/vmsystm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#define membar_producer() smp_wmb()
#define physmem totalram_pages
#define freemem nr_free_pages()
#define needfree 0
#define desfree 0
#define lotsfree 0

#define xcopyin(from, to, size) copy_from_user(to, from, size)
#define xcopyout(from, to, size) copy_to_user(to, from, size)
Expand Down

0 comments on commit 77ab5dd

Please sign in to comment.