infra: start dual compatibility with/out prepatch

Automatic detection whether the prepatch is applied or not.
This commit is contained in:
Thomas Schoebel-Theuer 2015-07-01 07:19:21 +02:00
parent eaa6fc0efc
commit 0c714a8bfc
3 changed files with 15 additions and 1 deletions

View File

@ -24,6 +24,12 @@
#ifndef BRICK_MEM_H
#define BRICK_MEM_H
/* TRANSITIONAL compatibility to BOTH the old prepatch
* and the new wrapper around vfs_*(). Both will be replaced
* for kernel upstream.
*/
#include "compat.h"
#include <linux/mm_types.h>
#ifndef CONFIG_MARS_MODULE

View File

@ -47,6 +47,8 @@
#include <asm/uaccess.h>
#include "compat.h"
#ifndef GFP_BRICK
#define GFP_BRICK GFP_NOIO
#endif

View File

@ -24,8 +24,15 @@
#ifndef MARS_H
#define MARS_H
/* TRANSITIONAL compatibility to BOTH the old prepatch
* and the new wrapper around vfs_*(). Both will be replaced
* for kernel upstream.
*/
#include "compat.h"
#include <linux/semaphore.h>
#include <linux/rwsem.h>
#include <linux/major.h>
//#define MARS_TRACING // write runtime trace data to /mars/trace.csv
@ -58,7 +65,6 @@
#error Fixme: CONFIG_DEBUG_SG does not work (fix the bio offset calculation)
#endif
/////////////////////////////////////////////////////////////////////////
// include the generic brick infrastructure