public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] s390 patches for the 3.15 merge window
@ 2014-03-31  7:24 Martin Schwidefsky
  2014-03-31 21:45 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Schwidefsky @ 2014-03-31  7:24 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-s390, Heiko Carstens

Hi Linus,

please pull from the 'for-linus' branch of

	git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:
There are two memory management related changes, the CMMA support for
KVM to avoid swap-in of freed pages and the split page table lock for
the PMD level. These two come with common code changes in mm/.

A fix for the long standing theoretical TLB flush problem, this one
comes with a common code change in kernel/sched/.

Another set of changes is Heikos uaccess work, included is the initial
set of patches with more to come.

And fixes and cleanups as usual.

Dominik Dingel (3):
      s390/mm: fixing comment so that parameter name match
      s390/mm: remove unnecessary parameter from gmap_do_ipte_notify
      s390/mm: remove unecessary parameter from pgste_ipte_notify

Gerald Schaefer (1):
      s390/appldata_os: fix cpu array size calculation

Heiko Carstens (13):
      s390/uaccess: normalize order of parameters of indirect uaccess function calls
      s390/uaccess: get rid of indirect function calls
      s390/uaccess: consistent types
      s390/setup: get rid of MACHINE_HAS_MVCOS machine flag
      s390/uaccess: remove dead kernel parameter 'user_mode='
      s390/uaccess: introduce 'uaccesspt' kernel parameter
      s390/bitops: fix comment
      s390/uaccess: remove copy_from_user_real()
      s390/checksum: remove memset() within csum_partial_copy_from_user()
      s390/compat: remove compat exec domain
      s390/perf: make print_debug_cf() static
      s390: update defconfigs
      s390/smp: limit number of cpus in possible cpu mask

Josh Triplett (1):
      s390: select CONFIG_TTY for use of tty in unconditional keyboard driver

Konstantin Weitz (2):
      mm: add support for discard of unused ptes
      s390/kvm: support collaborative memory management

Martin Schwidefsky (8):
      sched/mm: call finish_arch_post_lock_switch in idle_task_exit and use_mm
      s390/mm,tlb: race of lazy TLB flush vs. recreation of TLB entries
      s390/kvm: set guest page states to stable on re-ipl
      mm: mask bits from pmd in pmd_lockptr/pmd_huge_pte
      s390/mm: enable split page table lock for PMD level
      s390/airq: add support for irq ranges
      s390/ptrace: add support for PTRACE_SINGLEBLOCK
      s390/con3270: optionally disable auto update

Michael Holzheu (2):
      s390/sclp_early: Return correct HSA block count also for zero
      hypfs: Add clarification for "weight_min" attribute

Philipp Hachtmann (1):
      s390/topology: Remove call to update_cpu_masks()

Sebastian Ott (5):
      s390/cio: fix driver callback initialization for ccw consoles
      s390/cio: reorder initialization of ccw consoles
      s390/cio: fix irq stats for early interrupts on ccw consoles
      s390: improve debug feature usage
      s390: add some drivers/subsystems to the MAINTAINERS file

 MAINTAINERS                             |   27 ++++-
 arch/s390/Kconfig                       |    5 +
 arch/s390/appldata/appldata_os.c        |    2 +-
 arch/s390/configs/default_defconfig     |   46 +++++++--
 arch/s390/configs/gcov_defconfig        |   33 ++++--
 arch/s390/configs/performance_defconfig |   33 ++++--
 arch/s390/configs/zfcpdump_defconfig    |    1 -
 arch/s390/defconfig                     |   10 ++
 arch/s390/hypfs/hypfs_vm.c              |    9 +-
 arch/s390/include/asm/airq.h            |   14 ++-
 arch/s390/include/asm/bitops.h          |    8 +-
 arch/s390/include/asm/ccwdev.h          |    4 +-
 arch/s390/include/asm/checksum.h        |   11 +-
 arch/s390/include/asm/futex.h           |   13 +--
 arch/s390/include/asm/kvm_host.h        |    5 +-
 arch/s390/include/asm/mmu_context.h     |   39 ++++++-
 arch/s390/include/asm/pgalloc.h         |   18 +++-
 arch/s390/include/asm/pgtable.h         |  105 +++++++++++++------
 arch/s390/include/asm/ptrace.h          |    1 +
 arch/s390/include/asm/sclp.h            |    1 +
 arch/s390/include/asm/setup.h           |    3 -
 arch/s390/include/asm/thread_info.h     |    3 +
 arch/s390/include/asm/uaccess.h         |  171 +++++++++++++------------------
 arch/s390/include/uapi/asm/ptrace.h     |    6 ++
 arch/s390/kernel/Makefile               |    5 +-
 arch/s390/kernel/compat_exec_domain.c   |   29 ------
 arch/s390/kernel/early.c                |    2 -
 arch/s390/kernel/entry.S                |    9 +-
 arch/s390/kernel/entry64.S              |    9 +-
 arch/s390/kernel/perf_event.c           |    2 +-
 arch/s390/kernel/ptrace.c               |   13 ++-
 arch/s390/kernel/setup.c                |   17 ---
 arch/s390/kernel/smp.c                  |    8 +-
 arch/s390/kernel/topology.c             |    1 -
 arch/s390/kvm/diag.c                    |    3 +
 arch/s390/kvm/kvm-s390.c                |   25 +++++
 arch/s390/kvm/kvm-s390.h                |    2 +
 arch/s390/kvm/priv.c                    |   41 ++++++++
 arch/s390/lib/Makefile                  |    3 +-
 arch/s390/lib/find.c                    |    2 +-
 arch/s390/lib/uaccess.h                 |    8 +-
 arch/s390/lib/uaccess_mvcos.c           |  116 ++++++++++++++++-----
 arch/s390/lib/uaccess_pt.c              |   69 +++++--------
 arch/s390/mm/maccess.c                  |   28 +----
 arch/s390/mm/pgtable.c                  |  158 +++++++++++++++++++++++++++-
 arch/s390/pci/pci_debug.c               |    2 +-
 drivers/s390/char/con3215.c             |    8 +-
 drivers/s390/char/con3270.c             |   13 ++-
 drivers/s390/char/raw3270.c             |   26 ++++-
 drivers/s390/char/raw3270.h             |    3 +-
 drivers/s390/char/sclp_early.c          |   31 +++++-
 drivers/s390/cio/airq.c                 |   66 +++++++-----
 drivers/s390/cio/chsc_sch.c             |    3 +-
 drivers/s390/cio/cio.c                  |    4 +-
 drivers/s390/cio/device.c               |   52 ++++++----
 drivers/s390/net/qeth_core_main.c       |    4 +-
 include/asm-generic/pgtable.h           |   13 +++
 include/linux/mm.h                      |   10 +-
 kernel/sched/core.c                     |    4 +-
 mm/mmu_context.c                        |    3 +
 mm/rmap.c                               |   10 ++
 61 files changed, 943 insertions(+), 427 deletions(-)
 delete mode 100644 arch/s390/kernel/compat_exec_domain.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL] s390 patches for the 3.15 merge window
  2014-03-31  7:24 [GIT PULL] s390 patches for the 3.15 merge window Martin Schwidefsky
@ 2014-03-31 21:45 ` Linus Torvalds
  2014-04-01  6:52   ` Martin Schwidefsky
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2014-03-31 21:45 UTC (permalink / raw)
  To: Martin Schwidefsky, Ingo Molnar; +Cc: linux-kernel, linux-s390, Heiko Carstens

On Mon, Mar 31, 2014 at 12:24 AM, Martin Schwidefsky
<schwidefsky@de.ibm.com> wrote:
>
> There are two memory management related changes, the CMMA support for
> KVM to avoid swap-in of freed pages and the split page table lock for
> the PMD level. These two come with common code changes in mm/.

Ugh. I pulled it, but things like this makes me want to dig my eyes
out with a spoon:

  +#ifdef finish_arch_post_lock_switch
  +        finish_arch_post_lock_switch();
  +#endif

when I think the proper thing to do would have been to move the
#ifndef that creates an empty finish_arch_post_lock_switch() from
kernel/sched/sched.h to some common file, or possibly even just
duplicate it.

I detest #ifdef's in the middle of code. Yes, we do have them, but we
should try to avoid adding more of them.

Maybe we could have a <linux/mmu_context.h> that includes the
<asm/mmu_context.h> and then does that "let's add the dummy function
for architectures that don't need it"?

Added Ingo to the cc, since this ends up intersecting with the
scheduler code that now does the wrapper on its own.

              Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL] s390 patches for the 3.15 merge window
  2014-03-31 21:45 ` Linus Torvalds
@ 2014-04-01  6:52   ` Martin Schwidefsky
  2014-04-01 15:40     ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Schwidefsky @ 2014-04-01  6:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Ingo Molnar, linux-kernel, linux-s390, Heiko Carstens

On Mon, 31 Mar 2014 14:45:32 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, Mar 31, 2014 at 12:24 AM, Martin Schwidefsky
> <schwidefsky@de.ibm.com> wrote:
> >
> > There are two memory management related changes, the CMMA support for
> > KVM to avoid swap-in of freed pages and the split page table lock for
> > the PMD level. These two come with common code changes in mm/.
> 
> Ugh. I pulled it, but things like this makes me want to dig my eyes
> out with a spoon:
> 
>   +#ifdef finish_arch_post_lock_switch
>   +        finish_arch_post_lock_switch();
>   +#endif
> 
> when I think the proper thing to do would have been to move the
> #ifndef that creates an empty finish_arch_post_lock_switch() from
> kernel/sched/sched.h to some common file, or possibly even just
> duplicate it.
> 
> I detest #ifdef's in the middle of code. Yes, we do have them, but we
> should try to avoid adding more of them.
> 
> Maybe we could have a <linux/mmu_context.h> that includes the
> <asm/mmu_context.h> and then does that "let's add the dummy function
> for architectures that don't need it"?
> 
> Added Ingo to the cc, since this ends up intersecting with the
> scheduler code that now does the wrapper on its own.

Yes, I feel the pain. I actually tried to move the finish_arch_post_lock_switch
to linux/mmu_context.h but it turned out that this does not work. It broke
the corgi_defconfig, this is what I got from the friendly kbuild test robot:

-- snip

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head:   05bb2956f28ff01a102bf16702ba7bcb116ecf72
commit: 8f6d84ba48d8d4377c61477803c8ff2cd4b007b7 [10/14] sched/mm: call finish_arch_post_lock_switch in idle_task_exit and use_mm
config: make ARCH=arm corgi_defconfig

All error/warnings:

   In file included from include/linux/mmu_context.h:5:0,
                    from drivers/usb/gadget/inode.c:27:
   arch/arm/include/asm/mmu_context.h: In function 'finish_arch_post_lock_switch':
>> arch/arm/include/asm/mmu_context.h:82:3: error: implicit declaration of function 'preempt_enable_no_resched' [-Werror=implicit-function-declaration]  
   cc1: some warnings being treated as errors

vim +/preempt_enable_no_resched +82 arch/arm/include/asm/mmu_context.h

bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  76  		 */
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  77  		preempt_disable();
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  78  		if (mm->context.switch_pending) {
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  79  			mm->context.switch_pending = 0;
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  80  			cpu_switch_mm(mm->pgd, mm);
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23  81  		}
bdae73cd arch/arm/include/asm/mmu_context.h Catalin Marinas 2013-07-23 @82  		preempt_enable_no_resched();
b9d4d42a arch/arm/include/asm/mmu_context.h Catalin Marinas 2011-11-28  83  	}
b9d4d42a arch/arm/include/asm/mmu_context.h Catalin Marinas 2011-11-28  84  }
^1da177e include/asm-arm/mmu_context.h      Linus Torvalds  2005-04-16  85  

:::::: The code at line 82 was first introduced by commit
:::::: bdae73cd374e28db544fdd9b77de689a36e3c129 ARM: 7790/1: Fix deferred mm switch on VIVT processors

:::::: TO: Catalin Marinas <catalin.marinas@arm.com>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>

-- snip

I gave up after a few hours trying to solve the header dependencies, the two
trouble makes are alpha with the task_thread_info call in mmu_context.h and
arm with the preempt_enable_no_resched call. Welcome to include file hell.


-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL] s390 patches for the 3.15 merge window
  2014-04-01  6:52   ` Martin Schwidefsky
@ 2014-04-01 15:40     ` Linus Torvalds
  2014-04-02  7:14       ` Martin Schwidefsky
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2014-04-01 15:40 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: Ingo Molnar, linux-kernel, linux-s390, Heiko Carstens



On Tue, 1 Apr 2014, Martin Schwidefsky wrote:
> 
> I gave up after a few hours trying to solve the header dependencies, the two
> trouble makes are alpha with the task_thread_info call in mmu_context.h and
> arm with the preempt_enable_no_resched call. Welcome to include file hell.

I don't understand. The only file <asm/mmu_context.h> should need is 
<linux/mm.h>. Maybe <kernel/sched.h>.

Look at mm/mmu_context.c, for example. It includes <asm/mmu_context.h> 
without having included very many header files at all. So we *know* that 
that small set is sufficient. 

And there aren't very many users of <linux/mmu_context.h> and none of them 
are other header files, so there's no point in trying to religiously avoid 
including one or two header files from it.

So I'm thinking something like this should work. It's untested, and maybe 
some architecture really needs some other header file, but it looks quite 
likely to work. No?

              Linus

---
 include/linux/mmu_context.h | 8 +++++++-
 kernel/sched/core.c         | 2 +-
 kernel/sched/sched.h        | 3 ---
 mm/mmu_context.c            | 4 ----
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/linux/mmu_context.h b/include/linux/mmu_context.h
index 70fffeba7495..843bbc2abec0 100644
--- a/include/linux/mmu_context.h
+++ b/include/linux/mmu_context.h
@@ -1,7 +1,13 @@
 #ifndef _LINUX_MMU_CONTEXT_H
 #define _LINUX_MMU_CONTEXT_H
 
-struct mm_struct;
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <asm/mmu_context.h>
+
+#ifndef finish_arch_post_lock_switch
+#  define finish_arch_post_lock_switch() do { } while (0)
+#endif
 
 void use_mm(struct mm_struct *mm);
 void unuse_mm(struct mm_struct *mm);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a47902c687ae..20fc1bd8aec4 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -32,7 +32,7 @@
 #include <linux/init.h>
 #include <linux/uaccess.h>
 #include <linux/highmem.h>
-#include <asm/mmu_context.h>
+#include <linux/mmu_context.h>
 #include <linux/interrupt.h>
 #include <linux/capability.h>
 #include <linux/completion.h>
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index f2de7a175620..5eafd5e8c236 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -960,9 +960,6 @@ static inline int task_running(struct rq *rq, struct task_struct *p)
 #ifndef finish_arch_switch
 # define finish_arch_switch(prev)	do { } while (0)
 #endif
-#ifndef finish_arch_post_lock_switch
-# define finish_arch_post_lock_switch()	do { } while (0)
-#endif
 
 #ifndef __ARCH_WANT_UNLOCKED_CTXSW
 static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next)
diff --git a/mm/mmu_context.c b/mm/mmu_context.c
index f802c2d216a7..56ecbbdbf364 100644
--- a/mm/mmu_context.c
+++ b/mm/mmu_context.c
@@ -8,8 +8,6 @@
 #include <linux/export.h>
 #include <linux/sched.h>
 
-#include <asm/mmu_context.h>
-
 /*
  * use_mm
  *	Makes the calling kernel thread take on the specified
@@ -31,9 +29,7 @@ void use_mm(struct mm_struct *mm)
 	tsk->mm = mm;
 	switch_mm(active_mm, mm, tsk);
 	task_unlock(tsk);
-#ifdef finish_arch_post_lock_switch
 	finish_arch_post_lock_switch();
-#endif
 
 	if (active_mm != mm)
 		mmdrop(active_mm);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [GIT PULL] s390 patches for the 3.15 merge window
  2014-04-01 15:40     ` Linus Torvalds
@ 2014-04-02  7:14       ` Martin Schwidefsky
  2014-04-02 20:19         ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Schwidefsky @ 2014-04-02  7:14 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Ingo Molnar, linux-kernel, linux-s390, Heiko Carstens

On Tue, 1 Apr 2014 08:40:41 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> 
> 
> On Tue, 1 Apr 2014, Martin Schwidefsky wrote:
> > 
> > I gave up after a few hours trying to solve the header dependencies, the two
> > trouble makes are alpha with the task_thread_info call in mmu_context.h and
> > arm with the preempt_enable_no_resched call. Welcome to include file hell.
> 
> I don't understand. The only file <asm/mmu_context.h> should need is 
> <linux/mm.h>. Maybe <kernel/sched.h>.
> 
> Look at mm/mmu_context.c, for example. It includes <asm/mmu_context.h> 
> without having included very many header files at all. So we *know* that 
> that small set is sufficient. 
> 
> And there aren't very many users of <linux/mmu_context.h> and none of them 
> are other header files, so there's no point in trying to religiously avoid 
> including one or two header files from it.
> 
> So I'm thinking something like this should work. It's untested, and maybe 
> some architecture really needs some other header file, but it looks quite 
> likely to work. No?

I had a patch quite similar to yours and I ended up with the error report
from the kbuild robot. Just tried yours with the corgi_defconfig and got
this:

In file included from include/linux/mmu_context.h:6,
                 from drivers/usb/gadget/inode.c:27:
/home4/mschwide/linux/arch/arm/include/asm/mmu_context.h: In function 'finish_arch_post_lock_switch':
/home4/mschwide/linux/arch/arm/include/asm/mmu_context.h:82: error: implicit declaration of function 'preempt_enable_no_resched'

Part of the problem is this lovely piece from include/linux/preempt.h:

#ifdef MODULE
/*
 * Modules have no business playing preemption tricks.
 */
#undef sched_preempt_enable_no_resched
#undef preempt_enable_no_resched
#undef preempt_enable_no_resched_notrace
#undef preempt_check_resched
#endif

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL] s390 patches for the 3.15 merge window
  2014-04-02  7:14       ` Martin Schwidefsky
@ 2014-04-02 20:19         ` Linus Torvalds
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Torvalds @ 2014-04-02 20:19 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: Ingo Molnar, linux-kernel, linux-s390, Heiko Carstens

On Wed, Apr 2, 2014 at 12:14 AM, Martin Schwidefsky
<schwidefsky@de.ibm.com> wrote:
>
> Part of the problem is this lovely piece from include/linux/preempt.h:

Oh, the pain. That's annoying. Oh well. I guess we'll live with the
ugliness for now.

         Linus

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-02 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31  7:24 [GIT PULL] s390 patches for the 3.15 merge window Martin Schwidefsky
2014-03-31 21:45 ` Linus Torvalds
2014-04-01  6:52   ` Martin Schwidefsky
2014-04-01 15:40     ` Linus Torvalds
2014-04-02  7:14       ` Martin Schwidefsky
2014-04-02 20:19         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox