Commit ae67e87f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "Two bug fixes

   - a memory alignment fix in the s390 only hypfs code

   - a fix for the generic percpu code that caused ftrace to break on
     s390. This is not relevant for x86 but for all architectures that
     use the generic percpu code"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  percpu: use notrace variant of preempt_disable/preempt_enable
  s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment
parents e3a00f68 7f8d61f0
...@@ -363,11 +363,11 @@ static void *diag204_store(void) ...@@ -363,11 +363,11 @@ static void *diag204_store(void)
static int diag224_get_name_table(void) static int diag224_get_name_table(void)
{ {
/* memory must be below 2GB */ /* memory must be below 2GB */
diag224_cpu_names = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA); diag224_cpu_names = (char *) __get_free_page(GFP_KERNEL | GFP_DMA);
if (!diag224_cpu_names) if (!diag224_cpu_names)
return -ENOMEM; return -ENOMEM;
if (diag224(diag224_cpu_names)) { if (diag224(diag224_cpu_names)) {
kfree(diag224_cpu_names); free_page((unsigned long) diag224_cpu_names);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16); EBCASC(diag224_cpu_names + 16, (*diag224_cpu_names + 1) * 16);
...@@ -376,7 +376,7 @@ static int diag224_get_name_table(void) ...@@ -376,7 +376,7 @@ static int diag224_get_name_table(void)
static void diag224_delete_name_table(void) static void diag224_delete_name_table(void)
{ {
kfree(diag224_cpu_names); free_page((unsigned long) diag224_cpu_names);
} }
static int diag224_idx2name(int index, char *name) static int diag224_idx2name(int index, char *name)
......
...@@ -118,9 +118,9 @@ do { \ ...@@ -118,9 +118,9 @@ do { \
#define this_cpu_generic_read(pcp) \ #define this_cpu_generic_read(pcp) \
({ \ ({ \
typeof(pcp) __ret; \ typeof(pcp) __ret; \
preempt_disable(); \ preempt_disable_notrace(); \
__ret = raw_cpu_generic_read(pcp); \ __ret = raw_cpu_generic_read(pcp); \
preempt_enable(); \ preempt_enable_notrace(); \
__ret; \ __ret; \
}) })
......
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