Commit 790e2a29 authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Thomas Gleixner

x86 mmiotrace: page level is unsigned

Fixes some sparse warnings.
Signed-off-by: default avatarPekka Paalanen <pq@iki.fi>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a50445d7
...@@ -104,11 +104,12 @@ static struct kmmio_fault_page *get_kmmio_fault_page(unsigned long page) ...@@ -104,11 +104,12 @@ static struct kmmio_fault_page *get_kmmio_fault_page(unsigned long page)
return NULL; return NULL;
} }
static void set_page_present(unsigned long addr, bool present, int *pglevel) static void set_page_present(unsigned long addr, bool present,
unsigned int *pglevel)
{ {
pteval_t pteval; pteval_t pteval;
pmdval_t pmdval; pmdval_t pmdval;
int level; unsigned int level;
pmd_t *pmd; pmd_t *pmd;
pte_t *pte = lookup_address(addr, &level); pte_t *pte = lookup_address(addr, &level);
...@@ -145,15 +146,15 @@ static void set_page_present(unsigned long addr, bool present, int *pglevel) ...@@ -145,15 +146,15 @@ static void set_page_present(unsigned long addr, bool present, int *pglevel)
} }
/** Mark the given page as not present. Access to it will trigger a fault. */ /** Mark the given page as not present. Access to it will trigger a fault. */
static void arm_kmmio_fault_page(unsigned long page, int *page_level) static void arm_kmmio_fault_page(unsigned long page, unsigned int *pglevel)
{ {
set_page_present(page & PAGE_MASK, false, page_level); set_page_present(page & PAGE_MASK, false, pglevel);
} }
/** Mark the given page as present. */ /** Mark the given page as present. */
static void disarm_kmmio_fault_page(unsigned long page, int *page_level) static void disarm_kmmio_fault_page(unsigned long page, unsigned int *pglevel)
{ {
set_page_present(page & PAGE_MASK, true, page_level); set_page_present(page & PAGE_MASK, true, pglevel);
} }
/* /*
......
...@@ -137,7 +137,7 @@ static ssize_t write_marker(struct file *file, const char __user *buffer, ...@@ -137,7 +137,7 @@ static ssize_t write_marker(struct file *file, const char __user *buffer,
static void print_pte(unsigned long address) static void print_pte(unsigned long address)
{ {
int level; unsigned int level;
pte_t *pte = lookup_address(address, &level); pte_t *pte = lookup_address(address, &level);
if (!pte) { if (!pte) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment