Skip to content

Commit 743e89e

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky: "A couple of bug fixes, one of them is a TLB flush fix. Included as well is one small coding style patch and a patch to update the default configuration." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: [S390] Fix compile error in swab.h [S390] Fix stfle() lowcore protection problem [S390] cpum_cf: get rid of compile warnings [S390] irq: simple coding style change [S390] update default configuration [S390] fix tlb flushing for page table pages [S390] kernel: Use local_irq_save() for memcpy_real() [S390] s390/char/vmur.c: fix memory leak [S390] drivers/s390/block/dasd_eckd.c: add missing dasd_sfree_request
2 parents b6a8958 + affbb42 commit 743e89e

File tree

13 files changed

+125
-74
lines changed

13 files changed

+125
-74
lines changed

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ config S390
9090
select HAVE_KERNEL_XZ
9191
select HAVE_ARCH_MUTEX_CPU_RELAX
9292
select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
93-
select HAVE_RCU_TABLE_FREE if SMP
9493
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
9594
select HAVE_MEMBLOCK
9695
select HAVE_MEMBLOCK_NODE_MAP

arch/s390/defconfig

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
CONFIG_EXPERIMENTAL=y
22
CONFIG_SYSVIPC=y
33
CONFIG_POSIX_MQUEUE=y
4+
CONFIG_FHANDLE=y
5+
CONFIG_TASKSTATS=y
6+
CONFIG_TASK_DELAY_ACCT=y
7+
CONFIG_TASK_XACCT=y
8+
CONFIG_TASK_IO_ACCOUNTING=y
49
CONFIG_AUDIT=y
5-
CONFIG_RCU_TRACE=y
610
CONFIG_IKCONFIG=y
711
CONFIG_IKCONFIG_PROC=y
812
CONFIG_CGROUPS=y
@@ -14,16 +18,22 @@ CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
1418
CONFIG_CGROUP_SCHED=y
1519
CONFIG_RT_GROUP_SCHED=y
1620
CONFIG_BLK_CGROUP=y
21+
CONFIG_NAMESPACES=y
1722
CONFIG_BLK_DEV_INITRD=y
18-
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
23+
CONFIG_RD_BZIP2=y
24+
CONFIG_RD_LZMA=y
25+
CONFIG_RD_XZ=y
26+
CONFIG_RD_LZO=y
27+
CONFIG_EXPERT=y
1928
# CONFIG_COMPAT_BRK is not set
20-
CONFIG_SLAB=y
2129
CONFIG_PROFILING=y
2230
CONFIG_OPROFILE=y
2331
CONFIG_KPROBES=y
2432
CONFIG_MODULES=y
2533
CONFIG_MODULE_UNLOAD=y
2634
CONFIG_MODVERSIONS=y
35+
CONFIG_PARTITION_ADVANCED=y
36+
CONFIG_IBM_PARTITION=y
2737
CONFIG_DEFAULT_DEADLINE=y
2838
CONFIG_NO_HZ=y
2939
CONFIG_HIGH_RES_TIMERS=y
@@ -34,18 +44,15 @@ CONFIG_KSM=y
3444
CONFIG_BINFMT_MISC=m
3545
CONFIG_CMM=m
3646
CONFIG_HZ_100=y
37-
CONFIG_KEXEC=y
38-
CONFIG_PM=y
47+
CONFIG_CRASH_DUMP=y
3948
CONFIG_HIBERNATION=y
4049
CONFIG_PACKET=y
4150
CONFIG_UNIX=y
4251
CONFIG_NET_KEY=y
43-
CONFIG_AFIUCV=m
4452
CONFIG_INET=y
4553
CONFIG_IP_MULTICAST=y
4654
# CONFIG_INET_LRO is not set
4755
CONFIG_IPV6=y
48-
CONFIG_NET_SCTPPROBE=m
4956
CONFIG_L2TP=m
5057
CONFIG_L2TP_DEBUGFS=m
5158
CONFIG_VLAN_8021Q=y
@@ -84,15 +91,14 @@ CONFIG_SCSI_CONSTANTS=y
8491
CONFIG_SCSI_LOGGING=y
8592
CONFIG_SCSI_SCAN_ASYNC=y
8693
CONFIG_ZFCP=y
87-
CONFIG_ZFCP_DIF=y
8894
CONFIG_NETDEVICES=y
89-
CONFIG_DUMMY=m
9095
CONFIG_BONDING=m
96+
CONFIG_DUMMY=m
9197
CONFIG_EQUALIZER=m
9298
CONFIG_TUN=m
93-
CONFIG_NET_ETHERNET=y
9499
CONFIG_VIRTIO_NET=y
95100
CONFIG_RAW_DRIVER=m
101+
CONFIG_VIRTIO_BALLOON=y
96102
CONFIG_EXT2_FS=y
97103
CONFIG_EXT3_FS=y
98104
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
@@ -103,27 +109,21 @@ CONFIG_PROC_KCORE=y
103109
CONFIG_TMPFS=y
104110
CONFIG_TMPFS_POSIX_ACL=y
105111
# CONFIG_NETWORK_FILESYSTEMS is not set
106-
CONFIG_PARTITION_ADVANCED=y
107-
CONFIG_IBM_PARTITION=y
108-
CONFIG_DLM=m
109112
CONFIG_MAGIC_SYSRQ=y
110-
CONFIG_DEBUG_KERNEL=y
111113
CONFIG_TIMER_STATS=y
112114
CONFIG_PROVE_LOCKING=y
113115
CONFIG_PROVE_RCU=y
114116
CONFIG_LOCK_STAT=y
115117
CONFIG_DEBUG_LOCKDEP=y
116-
CONFIG_DEBUG_SPINLOCK_SLEEP=y
117118
CONFIG_DEBUG_LIST=y
118119
CONFIG_DEBUG_NOTIFIERS=y
119-
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
120+
CONFIG_RCU_TRACE=y
120121
CONFIG_KPROBES_SANITY_TEST=y
121122
CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
122123
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
123124
CONFIG_LATENCYTOP=y
124-
CONFIG_SYSCTL_SYSCALL_CHECK=y
125125
CONFIG_DEBUG_PAGEALLOC=y
126-
# CONFIG_FTRACE is not set
126+
CONFIG_BLK_DEV_IO_TRACE=y
127127
# CONFIG_STRICT_DEVMEM is not set
128128
CONFIG_CRYPTO_NULL=m
129129
CONFIG_CRYPTO_CRYPTD=m
@@ -173,4 +173,3 @@ CONFIG_CRYPTO_SHA512_S390=m
173173
CONFIG_CRYPTO_DES_S390=m
174174
CONFIG_CRYPTO_AES_S390=m
175175
CONFIG_CRC7=m
176-
CONFIG_VIRTIO_BALLOON=y

arch/s390/include/asm/facility.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ static inline void stfle(u64 *stfle_fac_list, int size)
3838
unsigned long nr;
3939

4040
preempt_disable();
41-
S390_lowcore.stfl_fac_list = 0;
4241
asm volatile(
4342
" .insn s,0xb2b10000,0(0)\n" /* stfl */
4443
"0:\n"
4544
EX_TABLE(0b, 0b)
46-
: "=m" (S390_lowcore.stfl_fac_list));
45+
: "+m" (S390_lowcore.stfl_fac_list));
4746
nr = 4; /* bytes stored by stfl */
4847
memcpy(stfle_fac_list, &S390_lowcore.stfl_fac_list, 4);
4948
if (S390_lowcore.stfl_fac_list & 0x01000000) {

arch/s390/include/asm/pgalloc.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ void crst_table_free(struct mm_struct *, unsigned long *);
2222

2323
unsigned long *page_table_alloc(struct mm_struct *, unsigned long);
2424
void page_table_free(struct mm_struct *, unsigned long *);
25-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
2625
void page_table_free_rcu(struct mmu_gather *, unsigned long *);
27-
void __tlb_remove_table(void *_table);
28-
#endif
2926

3027
static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
3128
{

arch/s390/include/asm/swab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static inline __u16 __arch_swab16p(const __u16 *x)
7777

7878
asm volatile(
7979
#ifndef __s390x__
80-
" icm %0,2,%O+1(%R1)\n"
80+
" icm %0,2,%O1+1(%R1)\n"
8181
" ic %0,%1\n"
8282
: "=&d" (result) : "Q" (*x) : "cc");
8383
#else /* __s390x__ */

arch/s390/include/asm/tlb.h

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,10 @@
3030

3131
struct mmu_gather {
3232
struct mm_struct *mm;
33-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
3433
struct mmu_table_batch *batch;
35-
#endif
3634
unsigned int fullmm;
37-
unsigned int need_flush;
3835
};
3936

40-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
4137
struct mmu_table_batch {
4238
struct rcu_head rcu;
4339
unsigned int nr;
@@ -49,37 +45,27 @@ struct mmu_table_batch {
4945

5046
extern void tlb_table_flush(struct mmu_gather *tlb);
5147
extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
52-
#endif
5348

5449
static inline void tlb_gather_mmu(struct mmu_gather *tlb,
5550
struct mm_struct *mm,
5651
unsigned int full_mm_flush)
5752
{
5853
tlb->mm = mm;
5954
tlb->fullmm = full_mm_flush;
60-
tlb->need_flush = 0;
61-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
6255
tlb->batch = NULL;
63-
#endif
6456
if (tlb->fullmm)
6557
__tlb_flush_mm(mm);
6658
}
6759

6860
static inline void tlb_flush_mmu(struct mmu_gather *tlb)
6961
{
70-
if (!tlb->need_flush)
71-
return;
72-
tlb->need_flush = 0;
73-
__tlb_flush_mm(tlb->mm);
74-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
7562
tlb_table_flush(tlb);
76-
#endif
7763
}
7864

7965
static inline void tlb_finish_mmu(struct mmu_gather *tlb,
8066
unsigned long start, unsigned long end)
8167
{
82-
tlb_flush_mmu(tlb);
68+
tlb_table_flush(tlb);
8369
}
8470

8571
/*
@@ -105,10 +91,8 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
10591
static inline void pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte,
10692
unsigned long address)
10793
{
108-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
10994
if (!tlb->fullmm)
11095
return page_table_free_rcu(tlb, (unsigned long *) pte);
111-
#endif
11296
page_table_free(tlb->mm, (unsigned long *) pte);
11397
}
11498

@@ -125,10 +109,8 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
125109
#ifdef __s390x__
126110
if (tlb->mm->context.asce_limit <= (1UL << 31))
127111
return;
128-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
129112
if (!tlb->fullmm)
130113
return tlb_remove_table(tlb, pmd);
131-
#endif
132114
crst_table_free(tlb->mm, (unsigned long *) pmd);
133115
#endif
134116
}
@@ -146,10 +128,8 @@ static inline void pud_free_tlb(struct mmu_gather *tlb, pud_t *pud,
146128
#ifdef __s390x__
147129
if (tlb->mm->context.asce_limit <= (1UL << 42))
148130
return;
149-
#ifdef CONFIG_HAVE_RCU_TABLE_FREE
150131
if (!tlb->fullmm)
151132
return tlb_remove_table(tlb, pud);
152-
#endif
153133
crst_table_free(tlb->mm, (unsigned long *) pud);
154134
#endif
155135
}

arch/s390/kernel/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,9 @@ ENTRY(startup_kdump)
474474
stck __LC_LAST_UPDATE_CLOCK
475475
spt 5f-.LPG0(%r13)
476476
mvc __LC_LAST_UPDATE_TIMER(8),5f-.LPG0(%r13)
477+
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
477478
#ifndef CONFIG_MARCH_G5
478479
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
479-
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
480480
.insn s,0xb2b10000,__LC_STFL_FAC_LIST # store facility list
481481
tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
482482
jz 0f

arch/s390/kernel/irq.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ asmlinkage void do_softirq(void)
118118
"a" (__do_softirq)
119119
: "0", "1", "2", "3", "4", "5", "14",
120120
"cc", "memory" );
121-
} else
121+
} else {
122122
/* We are already on the async stack. */
123123
__do_softirq();
124+
}
124125
}
125126

126127
local_irq_restore(flags);
@@ -192,11 +193,12 @@ int unregister_external_interrupt(u16 code, ext_int_handler_t handler)
192193
int index = ext_hash(code);
193194

194195
spin_lock_irqsave(&ext_int_hash_lock, flags);
195-
list_for_each_entry_rcu(p, &ext_int_hash[index], entry)
196+
list_for_each_entry_rcu(p, &ext_int_hash[index], entry) {
196197
if (p->code == code && p->handler == handler) {
197198
list_del_rcu(&p->entry);
198199
kfree_rcu(p, rcu);
199200
}
201+
}
200202
spin_unlock_irqrestore(&ext_int_hash_lock, flags);
201203
return 0;
202204
}
@@ -211,9 +213,10 @@ void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code,
211213

212214
old_regs = set_irq_regs(regs);
213215
irq_enter();
214-
if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator)
216+
if (S390_lowcore.int_clock >= S390_lowcore.clock_comparator) {
215217
/* Serve timer interrupts first. */
216218
clock_comparator_work();
219+
}
217220
kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
218221
if (ext_code.code != 0x1004)
219222
__get_cpu_var(s390_idle).nohz_delay = 1;

arch/s390/kernel/perf_cpum_cf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static void cpumf_pmu_enable(struct pmu *pmu)
178178
err = lcctl(cpuhw->state);
179179
if (err) {
180180
pr_err("Enabling the performance measuring unit "
181-
"failed with rc=%lx\n", err);
181+
"failed with rc=%x\n", err);
182182
return;
183183
}
184184

@@ -203,7 +203,7 @@ static void cpumf_pmu_disable(struct pmu *pmu)
203203
err = lcctl(inactive);
204204
if (err) {
205205
pr_err("Disabling the performance measuring unit "
206-
"failed with rc=%lx\n", err);
206+
"failed with rc=%x\n", err);
207207
return;
208208
}
209209

arch/s390/mm/maccess.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,14 @@ long probe_kernel_write(void *dst, const void *src, size_t size)
6161
return copied < 0 ? -EFAULT : 0;
6262
}
6363

64-
/*
65-
* Copy memory in real mode (kernel to kernel)
66-
*/
67-
int memcpy_real(void *dest, void *src, size_t count)
64+
static int __memcpy_real(void *dest, void *src, size_t count)
6865
{
6966
register unsigned long _dest asm("2") = (unsigned long) dest;
7067
register unsigned long _len1 asm("3") = (unsigned long) count;
7168
register unsigned long _src asm("4") = (unsigned long) src;
7269
register unsigned long _len2 asm("5") = (unsigned long) count;
73-
unsigned long flags;
7470
int rc = -EFAULT;
7571

76-
if (!count)
77-
return 0;
78-
flags = __arch_local_irq_stnsm(0xf8UL);
7972
asm volatile (
8073
"0: mvcle %1,%2,0x0\n"
8174
"1: jo 0b\n"
@@ -86,7 +79,23 @@ int memcpy_real(void *dest, void *src, size_t count)
8679
"+d" (_len2), "=m" (*((long *) dest))
8780
: "m" (*((long *) src))
8881
: "cc", "memory");
89-
arch_local_irq_restore(flags);
82+
return rc;
83+
}
84+
85+
/*
86+
* Copy memory in real mode (kernel to kernel)
87+
*/
88+
int memcpy_real(void *dest, void *src, size_t count)
89+
{
90+
unsigned long flags;
91+
int rc;
92+
93+
if (!count)
94+
return 0;
95+
local_irq_save(flags);
96+
__arch_local_irq_stnsm(0xfbUL);
97+
rc = __memcpy_real(dest, src, count);
98+
local_irq_restore(flags);
9099
return rc;
91100
}
92101

0 commit comments

Comments
 (0)