s390 patches for the 3.10-rc6
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:
Three kvm related memory management fixes, a fix for show_trace, a fix for early console output and a patch from Ben to help prevent compile errors in regard to irq functions (or our lack thereof).
Ben Hutchings (1):
s390/pci: Implement IRQ functions if !PCI
Christian Borntraeger (3):
s390/pgtable: Fix guest overindication for change bit s390/pgtable: Save pgste during modify_prot_start/commit s390/pgtable: make pgste lock an explicit barrier
Martin Schwidefsky (1):
s390/dumpstack: fix address ranges for asynchronous and panic stack
Peter Oberparleiter (1):
s390/sclp: fix new line detection
arch/s390/include/asm/pgtable.h | 32 ++++++++++++++------ arch/s390/kernel/dumpstack.c | 12 +++++--- arch/s390/kernel/irq.c | 64 +++++++++++++++++++++++++++++++++++++++ arch/s390/kernel/sclp.S | 2 +- arch/s390/pci/pci.c | 33 -------------------- 5 files changed, 95 insertions(+), 48 deletions(-)
arch/s390/include/asm/pgtable.h +22 -10
@@ -623,7 +623,7 @@ static inline pgste_t pgste_get_lock(pte_t *ptep) " csg %0,%1,%2\n" " jl 0b\n" : "=&d" (old), "=&d" (new), "=Q" (ptep[PTRS_PER_PTE]) - : "Q" (ptep[PTRS_PER_PTE]) : "cc"); + : "Q" (ptep[PTRS_PER_PTE]) : "cc", "memory");#endif return __pgste (new); }
@@ -635,11 +635,19 @@ static inline void pgste_set_unlock(pte_t *ptep, pgste_t pgste) " nihh %1,0xff7f\n" /* clear RCP_PCL_BIT */ " stg %1,%0\n" : "=Q" (ptep[PTRS_PER_PTE]) - : "d" (pgste_val(pgste)), "Q" (ptep[PTRS_PER_PTE]) : "cc"); + : "d" (pgste_val(pgste)), "Q" (ptep[PTRS_PER_PTE]) + : "cc", "memory");preempt_enable ();#endif } +static inline void pgste_set (pte_t *ptep,pgste_t pgste) +{ +#ifdef CONFIG_PGSTE + *(pgste_t *)(ptep +PTRS_PER_PTE ) = pgste; +#endif +} +static inline pgste_t pgste_update_all (pte_t *ptep,pgste_t pgste) {#ifdef CONFIG_PGSTE
@@ -704,17 +712,19 @@ static inline void pgste_set_key(pte_t *ptep, pgste_t pgste, pte_t entry) {#ifdef CONFIG_PGSTE unsigned long address; -unsigned long okey, nkey; +unsigned long nkey;if (pte_val (entry) & _PAGE_INVALID)return ; +VM_BUG_ON (!(pte_val (*ptep) & _PAGE_INVALID)); address =pte_val (entry) &PAGE_MASK ; - okey = nkey =page_get_storage_key (address); - nkey &= ~(_PAGE_ACC_BITS | _PAGE_FP_BIT); -/* Set page access key and fetch protection bit from pgste */ - nkey |= (pgste_val (pgste) & (RCP_ACC_BITS |RCP_FP_BIT )) >>56 ; -if (okey != nkey) -page_set_storage_key (address, nkey,0 ); +/* +* Set page access key and fetch protection bit from pgste. +* The guest C/R information is still in the PGSTE, set real +* key C/R to 0. +*/ + nkey = (pgste_val (pgste) & (RCP_ACC_BITS |RCP_FP_BIT )) >>56 ; +page_set_storage_key (address, nkey,0 );#endif }
@@ -1099,8 +1109,10 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,if (!mm_exclusive (mm))__ptep_ipte (address, ptep); -if (mm_has_pgste (mm)) +if (mm_has_pgste (mm)) { pgste =pgste_update_all (&pte, pgste); +pgste_set (ptep, pgste); + }return pte; }
arch/s390/kernel/dumpstack.c +8 -4
@@ -74,6 +74,8 @@ __show_trace(unsigned long sp, unsigned long low, unsigned long high)static void show_trace (struct task_struct *task,unsigned long *stack) { +const unsigned long frame_size = +STACK_FRAME_OVERHEAD +sizeof (struct pt_regs ); registerunsigned long __r15 asm ("15" );unsigned long sp;
@@ -82,11 +84,13 @@ static void show_trace(struct task_struct *task, unsigned long *stack) sp = task ? task->thread.ksp : __r15;printk ("Call Trace:\n" );#ifdef CONFIG_CHECK_STACK - sp =__show_trace (sp, S390_lowcore.panic_stack -4096 , - S390_lowcore.panic_stack); + sp =__show_trace (sp, + S390_lowcore.panic_stack + frame_size -4096 , + S390_lowcore.panic_stack + frame_size);#endif - sp =__show_trace (sp, S390_lowcore.async_stack -ASYNC_SIZE , - S390_lowcore.async_stack); + sp =__show_trace (sp, + S390_lowcore.async_stack + frame_size -ASYNC_SIZE , + S390_lowcore.async_stack + frame_size);if (task)__show_trace (sp, (unsigned long )task_stack_page (task), (unsigned long )task_stack_page (task) +THREAD_SIZE );
arch/s390/kernel/irq.c +64 -0
67 lines not on this page · raw message
arch/s390/kernel/sclp.S +1 -1
@@ -225,7 +225,7 @@ _sclp_print: ahi %r2,1 ltr %r0,%r0 # end of string? jz .LfinalizemtoS4 - chi %r0,0x15 # end of line (NL)? + chi %r0,0x0a # end of line (NL)? jz .LfinalizemtoS4 stc %r0,0(%r6,%r7) # copy to mto la %r11,0(%r6,%r7)
arch/s390/pci/pci.c +0 -33
@@ -302,15 +302,6 @@ static int zpci_cfg_store(struct zpci_dev *zdev, int offset, u32 val, u8 len)return rc; } -void synchronize_irq (unsigned int irq) -{ -/* -* Not needed, the handler is protected by a lock and IRQs that occur -* after the handler is deleted are just NOPs. -*/ -} -EXPORT_SYMBOL_GPL (synchronize_irq); -void enable_irq (unsigned int irq) {struct msi_desc *msi =irq_get_msi_desc (irq);
@@ -327,30 +318,6 @@ void disable_irq(unsigned int irq) }EXPORT_SYMBOL_GPL (disable_irq); -void disable_irq_nosync (unsigned int irq) -{ -disable_irq (irq); -} -EXPORT_SYMBOL_GPL (disable_irq_nosync); - -unsigned long probe_irq_on (void ) -{ -return 0 ; -} -EXPORT_SYMBOL_GPL (probe_irq_on); - -int probe_irq_off (unsigned long val) -{ -return 0 ; -} -EXPORT_SYMBOL_GPL (probe_irq_off); - -unsigned int probe_irq_mask (unsigned long val) -{ -return val; -} -EXPORT_SYMBOL_GPL (probe_irq_mask); -void pcibios_fixup_bus (struct pci_bus *bus) { }
Quoted 17 lines · Martin Schwidefsky
please pull from the 'for-linus' branch of
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.gitfor-linusto receive the following updates:
Three kvm related memory management fixes, a fix for
show_trace, a fix for early console output and a patch from Ben to help prevent compile errors in regard to irq functions (or our lack thereof).Ben Hutchings (1):
s390/pci: Implement IRQ functions if !PCIarch/s390/kernel/irq.c +0
-0@@ -311,3 +311,67 @@ void measurement_alert_subclass_unregister(void)spin_unlock (&ma_subclass_lock);
arch/s390/kernel/irq.c void measurement_alert_subclass_unregister(void) · line 321
Quoted 10 lines
arch/s390/kernel/irq.c +8
-0}EXPORT_SYMBOL (measurement_alert_subclass_unregister); + +void synchronize_irq (unsigned int irq) +{ +/* +* Not needed, the handler is protected by a lock and IRQs that occur +* after the handler is deleted are just NOPs. +*/ +}
allnoconfig:
arch/s390/kernel/irq.c:315:6: error: expected identifier or '(' before '__asm__'
http://kisskb.ellerman.id.au/kisskb/buildresult/8987667/
The function is expanded to:
void __asm__ __volatile__("": : :"memory")
{
}include/linux/hardirq.h: # define synchronize_irq(irq) barrier()include/linux/compiler-gcc.h: #define barrier() __asm__ __volatile__("": : :"memory")
Turning synchronize_irq() into a static inline function doesn't help as then it becomes a redefinition.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 13 lines · Geert Uytterhoeven
On Thu, Jun 13, 2013 at 4:47 PM, Martin Schwidefsky allnoconfig:
arch/s390/kernel/irq.c:315:6: error: expected identifier or '(' before '__asm__'
http://kisskb.ellerman.id.au/kisskb/buildresult/8987667/The function is expanded to:
void __asm__ __volatile__("": : :"memory") { }
Quoted 6 lines
include/linux/hardirq.h: # definesynchronize_irq(irq)barrier()include/linux/compiler-gcc.h: #definebarrier()__asm____volatile__("": : :"memory")Turning
synchronize_irq()into a static inline function doesn't help as then it becomes a redefinition.
We received a patch from Ben which fixes this:
From 7bf4da5763f30823b4eeb4c82f8499ffe2f475ab Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Fri, 14 Jun 2013 01:18:44 +0100
Subject: [PATCH] s390/irq: Only define synchronize_irq() on SMP
In uniprocessor configurations, synchronize_irq() is defined in <linux/hardirq.h> as a macro, and this function definition fails to compile.
--- arch/s390/kernel/irq.c | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/kernel/irq.c +2 -0
@@ -312,6 +312,7 @@ void measurement_alert_subclass_unregister(void) }EXPORT_SYMBOL (measurement_alert_subclass_unregister); +#ifdef CONFIG_SMP void synchronize_irq (unsigned int irq) {/*
@@ -320,6 +321,7 @@ void synchronize_irq(unsigned int irq) */ }EXPORT_SYMBOL_GPL (synchronize_irq); +#endif #ifndef CONFIG_PCI
Signature · 1 line
1.8.2.2