Re: linux plumbers + clang + s390 virtualized testing

2020-07-16 Thread Heiko Carstens
Hi Nick, > We were very excited to see your patches going by for enabling Clang > support for s390. Since then, we've added s390 builds to our > continuous integration setup. > > We've been running into a few issues with doing virtualized boot tests > of our kernels on s390. > > I was curious

Re: [PATCH -next] s390/mm: Convert to DEFINE_SHOW_ATTRIBUTE

2020-07-16 Thread Heiko Carstens
On Thu, Jul 16, 2020 at 05:07:03PM +0800, Qinglang Miao wrote: > From: Chen Huang > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Chen Huang > --- > arch/s390/mm/dump_pagetables.c | 12 +--- > 1 file changed, 1 insertion(+), 11 deletions(-) Thanks for the

Re: [PATCH v1 0/9] s390: implement and optimize vmemmap_free()

2020-07-10 Thread Heiko Carstens
On Wed, Jul 08, 2020 at 02:16:39PM +0200, David Hildenbrand wrote: > >>> Hmm.. I really would like to see if there would be only a single page > >>> table walker left in vmem.c, which handles both adding and removing > >>> things. > >>> Now we end up with two different page table walk

[GIT PULL] more s390 updates for 5.8-rc5

2020-07-10 Thread Heiko Carstens
to dd9ce2d6eeaebbdd342cbe095b7a195d569f18d3: MAINTAINERS: update email address for Gerald Schaefer (2020-07-10 15:06:49 +0200) - Update email addresses in MAINTAINERS file and add .mailmap entries for Gerald Schaefer and Heiko Carstens. - Fix huge pte

Re: [PATCH v1 0/9] s390: implement and optimize vmemmap_free()

2020-07-07 Thread Heiko Carstens
On Fri, Jul 03, 2020 at 03:39:08PM +0200, David Hildenbrand wrote: > This series is based on the latest s390/features branch [1]. It implements > vmemmap_free(), consolidating it with vmem_add_range(), and optimizes it by > - Freeing empty page tables (now also done for idendity mapping). > -

[GIT PULL] s390 updates for 5.8-rc5

2020-07-06 Thread Heiko Carstens
registrations of the same zPCI function. - Update defconfigs. Heiko Carstens (2): s390: update defconfigs Merge tag 'vfio-ccw-20200703' of https://git.kernel.org/.../kvms390/vfio-ccw into fixes Niklas Schnelle (1): s390

Re: [PATCH v1 0/9] s390: implement and optimize vmemmap_free()

2020-07-03 Thread Heiko Carstens
On Fri, Jul 03, 2020 at 03:39:08PM +0200, David Hildenbrand wrote: > This series is based on the latest s390/features branch [1]. It implements > vmemmap_free(), consolidating it with vmem_add_range(), and optimizes it by > - Freeing empty page tables (now also done for idendity mapping). > -

Re: [PATCH v2 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-07-03 Thread Heiko Carstens
On Thu, Jul 02, 2020 at 09:48:52PM -0700, Andrew Morton wrote: > On Thu, 2 Jul 2020 09:23:10 +0200 David Hildenbrand wrote: > > > >>> --- > > >>> arch/s390/kernel/crash_dump.c | 6 ++-- > > >>> include/linux/memblock.h | 28 ++--- > > >>> mm/memblock.c | 57

Re: [PATCH v2 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-07-01 Thread Heiko Carstens
> >> While fixing up the documentation, sneak in some related cleanups. We can > >> stop setting CONFIG_HAVE_MEMBLOCK_PHYS_MAP for s390x next. > > As you noted in the previous version it should have been > > CONFIG_ARCH_KEEP_MEMBLOCK ;-) > Grml :) maybe maintainers can fix that up when applying in

Re: [PATCH v2 1/2] mm/memblock: expose only miminal interface to add/walk physmem

2020-07-01 Thread Heiko Carstens
_KEEP_MEMBLOCK is no longer used with > > CONFIG_HAVE_MEMBLOCK_PHYS_MAP. > > > > While fixing up the documentation, sneak in some related cleanups. We can > > stop setting CONFIG_HAVE_MEMBLOCK_PHYS_MAP for s390x next. > > As you noted in the previous version it should

Re: [PATCH v1] s390/extmem: remove stale -ENOSPC comment and handling

2020-07-01 Thread Heiko Carstens
On Tue, Jun 30, 2020 at 10:42:40AM +0200, David Hildenbrand wrote: > segment_load() will no longer return -ENOSPC. If a segment overlaps with > storage, we now also return -EBUSY. Remove the stale comment from > __segment_load() and the stale handling from segment_warning(). >

Re: [PATCH RFC 2/2] s390/mm: don't set ARCH_KEEP_MEMBLOCK

2020-06-29 Thread Heiko Carstens
On Fri, Jun 26, 2020 at 06:32:15PM +0200, Heiko Carstens wrote: > On Fri, Apr 17, 2020 at 05:01:51PM +0200, David Hildenbrand wrote: > > Commit 50be63450728 ("s390/mm: Convert bootmem to memblock") mentions > > "The original bootmem allocator is getting replaced

Re: [PATCH] drivers/s390/char/tty3270: Remove function callback casts

2020-06-29 Thread Heiko Carstens
On Sat, Jun 27, 2020 at 02:54:17PM +0200, Oscar Carter wrote: > In an effort to enable -Wcast-function-type in the top-level Makefile to > support Control Flow Integrity builds, remove all the function callback > casts. > > To do this modify the function prototypes accordingly. > >

Re: [PATCH RFC] s390x/vmem: get rid of memory segment list

2020-06-29 Thread Heiko Carstens
On Mon, Jun 29, 2020 at 02:01:22PM +0200, David Hildenbrand wrote: > On 29.06.20 13:55, Heiko Carstens wrote: > > On Fri, Jun 26, 2020 at 08:46:21PM +0200, Gerald Schaefer wrote: > >> Verified with DCSS overlapping boot and standby memory, works fine. > >> As expected

Re: [PATCH RFC] s390x/vmem: get rid of memory segment list

2020-06-29 Thread Heiko Carstens
On Fri, Jun 26, 2020 at 08:46:21PM +0200, Gerald Schaefer wrote: > Verified with DCSS overlapping boot and standby memory, works fine. > As expected, the error message changes, but I don't think that is a > problem, as long as you also remove the old -ENOSPC case / comment > in

Re: [PATCH RFC 2/2] s390/mm: don't set ARCH_KEEP_MEMBLOCK

2020-06-26 Thread Heiko Carstens
o be > used in arch/s390/kernel/crash_dump.c to create the ELF header from > inside the 2nd (a.k.a. dumping) kernel. > > We no longer need ARCH_KEEP_MEMBLOCK. > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > Cc: Philipp Rudo > Cc: Michael Hol

Re: [PATCH RFC] s390x/vmem: get rid of memory segment list

2020-06-25 Thread Heiko Carstens
On Thu, Jun 25, 2020 at 05:00:29PM +0200, David Hildenbrand wrote: > This smells like a leftover from ancient times, let's get rid of it. We > can now convert vmem_remove_mapping() into a void function - everybody > ignored the return value already. This buys us what? Except that we get rid of a

Re: [PATCH][next] s390: appldata: Use struct_size() helper

2020-06-25 Thread Heiko Carstens
On Wed, Jun 17, 2020 at 04:29:30PM -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes. > > This code was detected with the help of Coccinelle and, audited and > fixed manually. > >

[GIT PULL] s390 updates for 5.8-rc3

2020-06-25 Thread Heiko Carstens
Hi Linus, please pull s390 updates for 5.8-rc3 Thanks, Heiko The following changes since commit 48778464bb7d346b47157d21ffde2af6b2d39110: Linux 5.8-rc2 (2020-06-21 15:45:29 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git

Re: [PATCH] mm/page_alloc: silence a KASAN false positive

2020-06-23 Thread Heiko Carstens
On Wed, Jun 10, 2020 at 08:26:00AM -0400, Qian Cai wrote: > On Wed, Jun 10, 2020 at 07:54:50AM +0200, Dmitry Vyukov wrote: > > On Wed, Jun 10, 2020 at 7:22 AM Qian Cai wrote: > > > > > > kernel_init_free_pages() will use memset() on s390 to clear all pages > > > from kmalloc_order() which will

Re: [PATCH v2] s390: fix build error for sys_call_table_emu

2020-06-19 Thread Heiko Carstens
> SYSCALL(sys_mlock,sys_mlock) > > According to the guidance of Heiko Carstens, use "-" to fill the empty system > call > Similarly, modify tools/perf/arch/s390/entry/syscalls/syscall.tbl. > > Fixes: ("All arch: remove system call sys_sysctl") > Fix

Re: [PATCH] s390: fix build error for sys_call_table_emu

2020-06-18 Thread Heiko Carstens
On Thu, Jun 18, 2020 at 07:03:20PM +0800, Xiaoming Ni wrote: > Build error on s390: > arch/s390/kernel/entry.o: in function `sys_call_table_emu': > >> (.rodata+0x1288): undefined reference to `__s390_' > > In commit ("All arch: remove system call sys_sysctl") > 148 common fdatasync

Re: [PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature

2020-06-17 Thread Heiko Carstens
On Wed, Jun 17, 2020 at 12:43:57PM +0200, Pierre Morel wrote: > An architecture protecting the guest memory against unauthorized host > access may want to enforce VIRTIO I/O device protection through the > use of VIRTIO_F_IOMMU_PLATFORM. > > Let's give a chance to the architecture to accept or

Re: [v3 PATCH 2/2] printk: Make linux/printk.h self-contained

2020-06-17 Thread Heiko Carstens
ude/asm/bug.h. > > Signed-off-by: Herbert Xu > Reviewed-by: Andy Shevchenko > Reviewed-by: Sergey Senozhatsky > Acked-by: Petr Mladek > Acked-by: Steven Rostedt (VMware) > --- > > arch/s390/include/asm/bug.h |2 - FWIW, feel free to add Acked-by: Heiko Carstens for the s390 part.

Re: [PATCH] s390: fix syscall_get_error for compat processes

2020-06-16 Thread Heiko Carstens
On Tue, Jun 02, 2020 at 09:00:51PM +0300, Dmitry V. Levin wrote: > If both the tracer and the tracee are compat processes, and gprs[2] > is assigned a value by __poke_user_compat, then the higher 32 bits > of gprs[2] are cleared, IS_ERR_VALUE() always returns false, and > syscall_get_error()

Re: [PATCH RFC 1/2] s390/zcore: traverse resources instead of memblocks

2020-06-10 Thread Heiko Carstens
@vm0:~# cat /sys/kernel/debug/zcore/memmap > 3000 3000 1000 > > The difference is due to memblocks getting merged, resources (currently) > not. So we might have some more entries, but they describe the same > memory map. > > Cc:

Re: [PATCH] s390: set NODES_SHIFT=0 when NUMA=n

2020-06-10 Thread Heiko Carstens
> Fixes: 701dc81e7412 ("s390/mm: remove fake numa support") > Signed-off-by: Qian Cai > --- > arch/s390/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Thanks! However I committed a different solution. Hope you don't mind: >From dd3f1f08f2317768b35

Re: [PATCH v6] s390: Fix vDSO clock_getres()

2020-06-09 Thread Heiko Carstens
er_resolution depends on the enablement of the high > resolution timers that can happen either at compile or at run time. > > Fix the s390 vdso implementation of clock_getres keeping a copy of > hrtimer_resolution in vdso data and using that directly. > > Cc: Heiko Carstens > Cc:

Re: [PATCH v2] s390: vdso: Use $(LD) instead of $(CC) to link vDSO

2020-06-09 Thread Heiko Carstens
On Tue, Jun 02, 2020 at 12:52:26PM -0700, Nick Desaulniers wrote: > On Tue, Jun 2, 2020 at 12:25 PM Nathan Chancellor > wrote: > > > > Currently, the VDSO is being linked through $(CC). This does not match > > how the rest of the kernel links objects, which is through the $(LD) > > variable. > >

Re: [PATCH -next 0/3] s390: use scnprintf() in show() methods

2020-06-08 Thread Heiko Carstens
On Sat, May 09, 2020 at 04:56:05PM +0800, Chen Zhou wrote: > snprintf() returns the number of bytes that would be written, > which may be greater than the the actual length to be written. > > show() methods should return the number of bytes printed into the > buffer. This is the return

Re: [PATCH -next] s390/zcrypt: fix kzalloc-simple.cocci warnings

2020-06-08 Thread Heiko Carstens
On Tue, Apr 21, 2020 at 08:35:48PM +0800, Zou Wei wrote: > This patch fixes below warning reported by coccicheck > > drivers/s390/crypto/zcrypt_ep11misc.c:198:8-15: WARNING: > kzalloc should be used for cprb, instead of kmalloc/memset > > Fixes: 7384eb725e2d ("s390/zcrypt: add new low level ep11

Re: [PATCH v4 15/16] module: Move where we mark modules RO,X

2019-10-22 Thread Heiko Carstens
On Mon, Oct 21, 2019 at 06:11:35PM +0200, Peter Zijlstra wrote: > On Mon, Oct 21, 2019 at 05:34:25PM +0200, Peter Zijlstra wrote: > > On Mon, Oct 21, 2019 at 04:14:02PM +0200, Peter Zijlstra wrote: > > > So On IRC Josh suggested we use text_poke() for RELA. Since KLP is only > > available on

Re: [GIT PULL] SCSI fixes for 5.4-rc3

2019-10-18 Thread Heiko Carstens
On Tue, Oct 15, 2019 at 03:15:22PM -0400, James Bottomley wrote: > Five changes, two in drivers (qla2xxx, zfcp), one to MAINTAINERS > (qla2xxx) and two in the core. The last two are mostly about removing > incorrect messages from the kernel log: the resid message is definitely > wrong and the

Re: [PATCH 5.4-rc1 BUILD FIX] s390: mark __cpacf_query() as __always_inline

2019-10-02 Thread Heiko Carstens
On Wed, Oct 02, 2019 at 09:03:33AM +0200, Michal Kubecek wrote: > On Wed, Oct 02, 2019 at 08:46:05AM +0200, Heiko Carstens wrote: > > On Tue, Oct 01, 2019 at 10:08:01PM +0200, Jiri Kosina wrote: > > > > > >In file included from arch/s390/kvm/kvm-s390.c:44: >

Re: [PATCH 5.4-rc1 BUILD FIX] s390: mark __cpacf_query() as __always_inline

2019-10-02 Thread Heiko Carstens
On Wed, Oct 02, 2019 at 08:46:05AM +0200, Heiko Carstens wrote: > On Tue, Oct 01, 2019 at 10:08:01PM +0200, Jiri Kosina wrote: > > I am wondering how is it possible that none of the build-testing > > infrastructure we have running against linux-next caught this? Not enough >

Re: [PATCH 5.4-rc1 BUILD FIX] s390: mark __cpacf_query() as __always_inline

2019-10-02 Thread Heiko Carstens
On Tue, Oct 01, 2019 at 10:08:01PM +0200, Jiri Kosina wrote: > arch/s390/kvm/kvm-s390.c calls on several places __cpacf_query() directly, > which makes it impossible to meet the "i" constraint for the asm operands > (opcode in this case). > > As we are now force-enabling

Re: [PATCH] mm/page_alloc: fix a crash in free_pages_prepare()

2019-09-30 Thread Heiko Carstens
kernel cmdline, and I suspect nobody tested that on s390 in > the > past. Yes. Peter Oberparleiter reported this also before my short vacation, but I didn't have time to look into this. Thanks for fixing! Reviewed-by: Heiko Carstens

Re: [PATCH] s390: remove pointless drivers-y in drivers/s390/Makefile

2019-09-14 Thread Heiko Carstens
On Thu, Sep 12, 2019 at 02:23:54PM +0900, Masahiro Yamada wrote: > This is unused. > > Signed-off-by: Masahiro Yamada > --- > > drivers/s390/Makefile | 3 --- > 1 file changed, 3 deletions(-) Applied, thanks.

Re: [PATCH] KVM: s390: kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset()

2019-09-10 Thread Heiko Carstens
On Tue, Sep 10, 2019 at 09:02:15AM -0400, Igor Mammedov wrote: > Make sure that ms->dirty_bitmap is set before using it or > print a warning and return -ENIVAL otherwise. ... > v2: >- drop WARN() ... > + if (!ms->dirty_bitmap) > + return -EINVAL; The patch

Re: linux-next: Tree for Aug 8

2019-08-08 Thread Heiko Carstens
On Thu, Aug 08, 2019 at 06:17:39PM +1000, Stephen Rothwell wrote: > Hi all, > > Changes since 20190807: > > I reverted a commit from the kbuild-current tree by request. Hello Masahiro, it looks like there is (another?) bug in kbuild. With your patch commit

Re: [PATCH 1/2] s390/extmem: Use refcount_t for refcount

2019-08-08 Thread Heiko Carstens
On Thu, Aug 08, 2019 at 03:18:17PM +0800, Chuhong Yuan wrote: > Reference counters are preferred to use refcount_t instead of > atomic_t. > This is because the implementation of refcount_t can prevent > overflows and detect possible use-after-free. > So convert atomic_t ref counters to refcount_t.

Re: [PATCH 2/2] s390/mm: Use refcount_t for refcount

2019-08-08 Thread Heiko Carstens
On Thu, Aug 08, 2019 at 03:18:26PM +0800, Chuhong Yuan wrote: > Reference counters are preferred to use refcount_t instead of > atomic_t. > This is because the implementation of refcount_t can prevent > overflows and detect possible use-after-free. > So convert atomic_t ref counters to refcount_t.

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-08-02 Thread Heiko Carstens
On Fri, Aug 02, 2019 at 02:48:44PM +1000, Stephen Rothwell wrote: > Hi Herbert, > > On Fri, 2 Aug 2019 13:14:14 +1000 Herbert Xu > wrote: > > > > For now I'm going to back out those two specific patches as the > > rest seem to be valid by themselves. > > I have applied the top commit from your

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-08-02 Thread Heiko Carstens
On Thu, Aug 01, 2019 at 08:28:56PM +0300, Ard Biesheuvel wrote: > On Thu, 1 Aug 2019 at 15:28, Heiko Carstens wrote: > > Still not... with linux-next as of today I get this (s390 defconfig): > > > > ERROR: "crypto_aegis128_decrypt_chunk_simd" [crypto/ae

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-08-01 Thread Heiko Carstens
On Wed, Jul 31, 2019 at 01:44:54PM +0200, Heiko Carstens wrote: > On Wed, Jul 31, 2019 at 09:32:16PM +1000, Herbert Xu wrote: > > On Wed, Jul 31, 2019 at 01:15:20PM +0200, Heiko Carstens wrote: > > > > > > However that doesn't fix the simd.h header file breakage

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-07-31 Thread Heiko Carstens
On Wed, Jul 31, 2019 at 09:32:16PM +1000, Herbert Xu wrote: > On Wed, Jul 31, 2019 at 01:15:20PM +0200, Heiko Carstens wrote: > > > > However that doesn't fix the simd.h header file breakage with the > > second patch :) > > That fix should be there now too. Yes, works now. Thank you!

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-07-31 Thread Heiko Carstens
On Wed, Jul 31, 2019 at 09:08:17PM +1000, Herbert Xu wrote: > On Wed, Jul 31, 2019 at 10:58:20AM +0200, Heiko Carstens wrote: > > On Wed, Jul 31, 2019 at 04:39:15PM +1000, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20190730: > > &

Re: [PATCH v5 15/29] compat_ioctl: move tape handling into drivers

2019-07-31 Thread Heiko Carstens
() > check, the caller does not have to keep track of whether this was > called through .unlocked_ioctl() or .compat_ioctl(). > > Signed-off-by: Arnd Bergmann Besides the two minor things below Acked-by: Heiko Carstens > diff --git a/include/linux/mtio.h b/include/linux/mtio.h &

Re: linux-next: Tree for Jul 31 - s390 crypto build breakage

2019-07-31 Thread Heiko Carstens
On Wed, Jul 31, 2019 at 04:39:15PM +1000, Stephen Rothwell wrote: > Hi all, > > Changes since 20190730: Hello Ard, two of your patches in the crypto tree cause build breakage on s390: The patch ("crypto: aes - create AES library based on the fixed time AES code") causes this:

[GIT PULL] s390 updates for 5.3-rc2

2019-07-27 Thread Heiko Carstens
on airq_areas[] Heiko Carstens (2): Merge tag 'vfio-ccw-20190717-2' of https://git.kernel.org/.../kvms390/vfio-ccw into fixes kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test Julian Wiedmann (2): s390/qdio: add sanity checks to the fast-requeue path s390

Re: linux-next: Fixes tag needs some work in the s390-fixes tree

2019-07-23 Thread Heiko Carstens
Hi Stephen, On Wed, Jul 24, 2019 at 07:42:27AM +1000, Stephen Rothwell wrote: > In commit > 8b515be512a2 ("vfio-ccw: Fix memory leak and don't call cp_free in cp_init") > Fixes tag > Fixes: 812271b910 ("s390/cio: Squash cp_free() and cp_unpin_free()") > - SHA1 should be at least 12 digits

Re: [PATCH] s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header

2019-07-22 Thread Heiko Carstens
.h | 35 +++-- > 1 file changed, 18 insertions(+), 17 deletions(-) Applied, thanks! I also added the patch below: >From b312d5e2244f635f83cbf19b850e26c1c443f465 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Mon, 22 Jul 2019 14:16:46 +0200 Subject: [PATC

[GIT PULL] s390 updates for 5.2-rc6

2019-06-20 Thread Heiko Carstens
-ccw: Destroy kmem cache region on module exit Guenter Roeck (1): s390/ctl_reg: mark __ctl_set_bit and __ctl_clear_bit as __always_inline Heiko Carstens (1): s390/boot: disable address-of-packed-member warning arch/s390/Makefile | 1 + arch/s390/include/asm/ctl_reg.h | 4

Re: [PATCH v3 0/4] s390/crypto: Use -ENODEV instead of -EOPNOTSUPP

2019-06-13 Thread Heiko Carstens
On Thu, Jun 13, 2019 at 11:13:55AM +0800, Herbert Xu wrote: > On Wed, Jun 12, 2019 at 05:08:50PM +0200, Heiko Carstens wrote: > > On Wed, Jun 12, 2019 at 03:33:02PM +0200, David Hildenbrand wrote: > > > s390x crypto is one of the rare modules that returns -

[PATCHv2 2/3] s390: improve wait logic of stop_machine

2019-06-13 Thread Heiko Carstens
the hypervisor to run this next CPU instead of the current one. If there is only a limited number of real CPUs backing the virtual CPUs we end up with the real CPUs passed around in a round-robin fashion. Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- arch/s390/include/asm

[PATCHv2 3/3] processor: get rid of cpu_relax_yield

2019-06-13 Thread Heiko Carstens
stop_machine is the only user left of cpu_relax_yield. Given that it now has special semantics which are tied to stop_machine introduce a weak stop_machine_yield function which architectures can override, and get rid of the generic cpu_relax_yield implementation. Signed-off-by: Heiko Carstens

[PATCHv2 0/3] improve wait logic of stop_machine

2019-06-13 Thread Heiko Carstens
ell the hypervisor to run this next CPU instead of the current one. If there is only a limited number of real CPUs backing the virtual CPUs we end up with the real CPUs passed around in a round-robin fashion. Patches 1 and 3 are just possible cleanups; the interesting part is patch 2. Heiko Carstens

[PATCHv2 1/3] processor: remove spin_cpu_yield

2019-06-13 Thread Heiko Carstens
spin_cpu_yield is unused, therefore remove it. Signed-off-by: Heiko Carstens --- arch/powerpc/include/asm/processor.h | 2 -- include/linux/processor.h| 9 - 2 files changed, 11 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm

Re: [PATCH/RFC 2/3] s390: improve wait logic of stop_machine

2019-06-11 Thread Heiko Carstens
On Tue, Jun 11, 2019 at 11:15:46AM +0200, Peter Zijlstra wrote: > On Sat, Jun 08, 2019 at 01:08:52PM +0200, Heiko Carstens wrote: > > --- a/arch/s390/kernel/processor.c > > +++ b/arch/s390/kernel/processor.c > > @@ -31,6 +31,7 @@ struct cpu_info { > > }; > >

Re: [PATCH] s390: mark __ctl_set_bit and __ctl_clear_bit as __always_inline

2019-06-10 Thread Heiko Carstens
On Sun, Jun 09, 2019 at 01:35:44PM -0700, Guenter Roeck wrote: > s390:tinyconfig fails to build with gcc 8.3.0. ... > Marking __ctl_set_bit and __ctl_clear_bit as __always_inline fixes the > problem. > > Fixes: 9012d011660e ("compiler: allow all arches to enable > CONFIG_OPTIMIZE_INLINING") >

[GIT PULL] s390 updates for 5.2-rc4

2019-06-08 Thread Heiko Carstens
Hello Linus, please pull two bug fixes for s390. Thanks, Heiko The following changes since commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a: Linux 5.2-rc3 (2019-06-02 13:55:33 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git

[PATCH/RFC 2/3] s390: improve wait logic of stop_machine

2019-06-08 Thread Heiko Carstens
the hypervisor to run this next CPU instead of the current one. If there is only a limited number of real CPUs backing the virtual CPUs we end up with the real CPUs passed around in a round-robin fashion. Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- arch/s390/include/asm

[PATCH/RFC 1/3] processor: remove spin_cpu_yield

2019-06-08 Thread Heiko Carstens
spin_cpu_yield is unused, therefore remove it. Signed-off-by: Heiko Carstens --- arch/powerpc/include/asm/processor.h | 2 -- include/linux/processor.h| 9 - 2 files changed, 11 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm

[PATCH/RFC 3/3] processor: get rid of cpu_relax_yield

2019-06-08 Thread Heiko Carstens
stop_machine is the only user left of cpu_relax_yield. Given that it now has special semantics which are tied to stop_machine introduce a weak stop_machine_yield function which architectures can override, and get rid of the generic cpu_relax_yield implementation. Signed-off-by: Heiko Carstens

[PATCH/RFC 0/3] improve wait logic of stop_machine

2019-06-08 Thread Heiko Carstens
to tell the hypervisor to run this next CPU instead of the current one. If there is only a limited number of real CPUs backing the virtual CPUs we end up with the real CPUs passed around in a round-robin fashion. Patches 1 and 3 are just possible cleanups; the interesting part is patch 2. Heiko

Re: [PATCH] s390: configs: Remove useless UEVENT_HELPER_PATH

2019-06-04 Thread Heiko Carstens
On Tue, Jun 04, 2019 at 09:58:57AM +0200, Krzysztof Kozlowski wrote: > Remove the CONFIG_UEVENT_HELPER_PATH because: > 1. It is disabled since commit 1be01d4a5714 ("driver: base: Disable >CONFIG_UEVENT_HELPER by default") as its dependency (UEVENT_HELPER) was >made default to 'n', > 2. It

Re: [PATCH] s390: fix unrecognized __aligned() in uapi header

2019-06-04 Thread Heiko Carstens
On Tue, Jun 04, 2019 at 05:29:47PM +0900, Masahiro Yamada wrote: > __aligned() is a shorthand that is only available in the kernel space > because it is defined in include/linux/compiler_attributes.h, which is > not exported to the user space. > > Detected by compile-testing exported headers. >

Re: [PATCH] s390: Kconfig: pedantic cleanups

2019-06-01 Thread Heiko Carstens
On Wed, Mar 06, 2019 at 09:32:01PM +0100, Enrico Weigelt, metux IT consult wrote: > Formatting of Kconfig files doesn't look so pretty, so just > take damp cloth and clean it up. > > Signed-off-by: Enrico Weigelt, metux IT consult > --- > arch/s390/Kconfig | 2 +- >

Re: [PATCH] s390: mmap base does not depend on ADDR_NO_RANDOMIZE personality

2019-06-01 Thread Heiko Carstens
On Thu, Apr 04, 2019 at 02:19:56AM -0400, Alexandre Ghiti wrote: > randomize_stack_top() checks for current task flag PF_RANDOMIZE in order > to use stack randomization and PF_RANDOMIZE is set when > ADDR_NO_RANDOMIZE is unset, so no need to check for ADDR_NO_RANDOMIZE > in stack_maxrandom_size. >

Re: [PATCH 4/4] s390: drop meaningless 'targets' from tools Makefile

2019-06-01 Thread Heiko Carstens
On Fri, May 17, 2019 at 04:54:27PM +0900, Masahiro Yamada wrote: > 'targets' should be specified to include .*.cmd files to evaluate > if_changed or friends. > > Here, facility-defs.h and dis-defs.h are generated by filechk. > > Because filechk does not generate .*.cmd file, the 'targets'

Re: [PATCH] s390/purgatory: update .gitignore

2019-06-01 Thread Heiko Carstens
On Fri, May 31, 2019 at 11:46:51AM +0900, Masahiro Yamada wrote: > Since commit 4c0f032d4963 ("s390/purgatory: Omit use of bin2c"), > kexec-purgatory.c is not generated. > > purgatory and purgatory.lds are generated files, so should be ignored > by git. > > Signed-off-by: Masahiro Yamada > ---

Re: [PATCH 3/4] s390: drop redundant directory creation from tools Makefile

2019-06-01 Thread Heiko Carstens
On Fri, May 17, 2019 at 04:54:26PM +0900, Masahiro Yamada wrote: > As you can see in scripts/Kbuild.include, the filechk creates the > parent directory of the target as needed. > > This Makefile does not need to explicitly create the directory. > > Signed-off-by: Masahiro Yamada > --- > >

Re: [PATCH 1/4] s390: do not pass $(LINUXINCLUDE) to gen_opcode_table.c

2019-06-01 Thread Heiko Carstens
On Fri, May 17, 2019 at 04:54:24PM +0900, Masahiro Yamada wrote: > I guess HOSTCFLAGS_gen_opcode_table.o was blindly copied from > HOSTCFLAGS_gen_facilities.o > > The reason of adding $(LINUXINCLUDE) to HOSTCFLAGS_gen_facilities.o > is because gen_facilities.c references some CONFIG options.

Re: [PATCH] arch: s390: use struct_size() in kmalloc()

2019-06-01 Thread Heiko Carstens
On Fri, May 17, 2019 at 03:15:17PM +0800, xiaolinkui wrote: > Use the new struct_size() helper to keep code simple. > > Signed-off-by: xiaolinkui > --- > arch/s390/include/asm/idals.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/s390/include/asm/idals.h

Re: [PATCH 2/4] s390: drop unneeded -Wall addition from tools Makefile

2019-06-01 Thread Heiko Carstens
On Fri, May 17, 2019 at 04:54:25PM +0900, Masahiro Yamada wrote: > The top level Makefile adds -Wall globally for all host tools: > > KBUILD_HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \ > > I see two "-Wall" added for compiling these tools. > > Of course, it is allowed

[GIT PULL] s390 updates for 5.2-rc3

2019-05-31 Thread Heiko Carstens
Heiko Carstens (2): MAINTAINERS: Farewell Martin Schwidefsky MAINTAINERS: add Vasily Gorbik and Christian Borntraeger for s390 Masahiro Yamada (2): s390: add unreachable() to dump_fault_info() to fix -Wmaybe-uninitialized s390: mark __cpacf_check_opcode

Sad News - Martin Schwidefsky

2019-05-21 Thread Heiko Carstens
We are devastated by the tragic death of Martin Schwidefsky who died in an accident last Saturday. Martin was the most significant contributor to the initial s390 port of the Linux Kernel and later the maintainer of the s390 architecture backend. His technical expertise as well as his mentoring

Re: [LTP] LTP: Syscalls: 274 failures: EROFS(30): Read-only file system

2019-05-14 Thread Heiko Carstens
On Mon, May 13, 2019 at 03:16:11AM -0400, Jan Stancek wrote: > - Original Message - > > We have noticed 274 syscall test failures on x86_64 and i386 due to > > Make the temporary directory in one shot using mkdtemp failed. > > tst_tmpdir.c:264: BROK: tst_tmpdir: > >

Early printk breakage due to 3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid pointers")

2019-05-09 Thread Heiko Carstens
Hello Petr, I just realized that early printks, or more specific vsnprintf invocations, are broken on s390 due to 3e5903eb9cff ("vsprintf: Prevent crash when dereferencing invalid pointers"). E.g. the early boot output now looks like this where the first (efault) should be the linux_banner: [

Re: [PATCH v2] modules: Only return -EEXIST for modules that have finished loading

2019-05-08 Thread Heiko Carstens
Hi Prarit, On Tue, May 07, 2019 at 10:54:13AM -0400, Prarit Bhargava wrote: > Heiko, it would still be good to get a test of this patch from you. I > tested this here at Red Hat on some System Z machines. Without the > modification made here in v2, the systems failed to boot ~10% of the time. >

Re: [PATCH v2 4/4] s390: fix clang -Wpointer-sign warnigns in boot code

2019-05-03 Thread Heiko Carstens
On Mon, Apr 15, 2019 at 10:35:54AM +0200, Arnd Bergmann wrote: > The arch/s390/boot directory is built with its own set of compiler > options that does not include -Wno-pointer-sign like the rest of > the kernel does, this causes a lot of harmess but correct warnings > when building with clang. >

Re: [PATCH] s390: vdso: drop unnecessary cc-ldoption

2019-05-03 Thread Heiko Carstens
On Tue, Apr 30, 2019 at 01:25:09PM -0700, Nick Desaulniers wrote: > On Tue, Apr 23, 2019 at 2:01 PM Nick Desaulniers > wrote: > > > > Towards the goal of removing cc-ldoption, it seems that --hash-style= > > was added to binutils 2.17.50.0.2 in 2006. The minimal required version > > of binutils

Re: [PATCH v2 3/4] s390: drop CONFIG_VIRT_TO_BUS

2019-05-03 Thread Heiko Carstens
On Mon, Apr 15, 2019 at 10:35:53AM +0200, Arnd Bergmann wrote: > VIRT_TO_BUS is only used for legacy device PCI and ISA drivers using > virt_to_bus() instead of the streaming DMA mapping API, and the > remaining drivers generally don't work on 64-bit architectures. > > Two of these drivers also

Re: [PATCH v2 2/4] s390: boot, purgatory: pass $(CLANG_FLAGS) where needed

2019-05-03 Thread Heiko Carstens
On Mon, Apr 15, 2019 at 09:12:06AM -0700, Nathan Chancellor wrote: > On Mon, Apr 15, 2019 at 10:35:52AM +0200, Arnd Bergmann wrote: > > The purgatory and boot Makefiles do not inherit the original cflags, > > so clang falls back to the default target architecture when building it, > > typically

Re: [PATCH v2 1/4] s390: only build for new CPUs with clang

2019-05-03 Thread Heiko Carstens
On Mon, Apr 15, 2019 at 10:35:51AM +0200, Arnd Bergmann wrote: > llvm does does not understand -march=z9-109 and older target > specifiers, so disable the respective Kconfig settings and > the logic to make the boot code work on old systems when > building with clang. > > Part of the early boot

Re: [PATCH 2/3] s390: remove ARCH_SELECT_MEMORY_MODEL

2019-05-03 Thread Heiko Carstens
-- > 1 file changed, 3 deletions(-) Acked-by: Heiko Carstens

Re: [PATCH] kernel/module: Reschedule while waiting for modules to finish loading

2019-04-30 Thread Heiko Carstens
th the Reported-by tag. Thank you! > >8< > > > >On a s390 z14 LAR with 2 cpus about stalls about 3% of the time while > >loading the s390_trng.ko module. > > > >Add a reschedule point to the loop that waits for modules to complete > >loading

Re: [GIT PULL] Please pull RDMA subsystem changes

2019-04-29 Thread Heiko Carstens
On Sun, Apr 28, 2019 at 11:52:12AM +, Jason Gunthorpe wrote: > Hi Linus, > > Third rc pull request > > Nothing particularly special here. There is a small merge conflict > with Adrea's mm_still_valid patches which is resolved as below: ... > Jason Gunthorpe (3): > RDMA/mlx5: Do not

Re: [-next] system hangs likely due to "modules: Only return -EEXIST for modules that have finished loading"

2019-04-28 Thread Heiko Carstens
On Sat, Apr 27, 2019 at 06:42:51AM -0400, Prarit Bhargava wrote: > On 4/27/19 6:24 AM, Heiko Carstens wrote: > > > > > diff --git a/kernel/module.c b/kernel/module.c > > index 410eeb7e4f1d..48748cfec991 100644 > > --- a/kernel/module.c > > +++ b/kernel/modu

Re: [-next] system hangs likely due to "modules: Only return -EEXIST for modules that have finished loading"

2019-04-27 Thread Heiko Carstens
On Fri, Apr 26, 2019 at 08:20:52PM -0400, Prarit Bhargava wrote: > Heiko and Jessica, > > The issue doesn't appear to be with my patch AFAICT. The s390_trng fails to > load and then the kernel occasionally hangs (as Heiko mentioned) calling > synchronize_rcu(). > > The call sequence is > >

Re: [-next] system hangs likely due to "modules: Only return -EEXIST for modules that have finished loading"

2019-04-26 Thread Heiko Carstens
On Fri, Apr 26, 2019 at 09:22:34AM -0400, Prarit Bhargava wrote: > On 4/26/19 9:07 AM, Heiko Carstens wrote: > > Hello Prarit, > > > > it looks like your commit f9a75c1d717f ("modules: Only return -EEXIST > > for modules that have finished loading")

[-next] system hangs likely due to "modules: Only return -EEXIST for modules that have finished loading"

2019-04-26 Thread Heiko Carstens
Hello Prarit, it looks like your commit f9a75c1d717f ("modules: Only return -EEXIST for modules that have finished loading") _sometimes_ causes hangs on s390. This is unfortunately not 100% reproducible, however the mentioned commit seems to be the only relevant one in modules.c. What I see is a

Re: [PATCH 1/2] s390: only build for new CPUs with clang

2019-04-11 Thread Heiko Carstens
On Wed, Apr 10, 2019 at 10:12:40PM +0200, Arnd Bergmann wrote: > llvm does does not understand -march=z9-109 and older target > specifiers, so disable the respective Kconfig settings and > the logic to make the boot code work on old systems when > building with clang. > > Signed-off-by: Arnd

Re: [PATCH v3] ubsan: Avoid unnecessary 128-bit shifts

2019-04-09 Thread Heiko Carstens
On Fri, Apr 05, 2019 at 01:58:53AM +, George Spelvin wrote: > If CONFIG_ARCH_SUPPORTS_INT128, s_max is 128 bits, and variable > sign-extending shifts of such a double-word data type are a non-trivial > amount of code and complexity. Do a single-word sign-extension *before* > the cast to

Re: [PATCH] s390/mm: Silence compiler warning when compiling without CONFIG_PGSTE

2019-04-08 Thread Heiko Carstens
On Mon, Apr 08, 2019 at 12:36:32PM +0200, Thomas Huth wrote: > On 08/04/2019 09.09, David Hildenbrand wrote: > > On 07.04.19 14:55, Thomas Huth wrote: > >> If CONFIG_PGSTE is not set (e.g. when compiling without KVM), GCC > >> complains: > >> > >> CC arch/s390/mm/pgtable.o > >>

Re: [PATCH] s390:tty3270:move spin_lock_bh to spin_lock in tasklet

2019-03-20 Thread Heiko Carstens
On Wed, Mar 20, 2019 at 12:12:36AM +0800, Jeff Xie wrote: > It is unnecessary to call spin_lock_bh in a tasklet. > > Signed-off-by: Jeff Xie > --- > drivers/s390/char/tty3270.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/s390/char/tty3270.c

Re: [PATCH] zcrypt: handle AP Info notification from CHSC SEI command

2019-02-21 Thread Heiko Carstens
On Thu, Feb 21, 2019 at 01:12:40PM +0100, Cornelia Huck wrote: > On Thu, 21 Feb 2019 11:42:25 +0100 > Harald Freudenberger wrote: > > > On 30.01.19 19:32, Sebastian Ott wrote: > > > On Wed, 30 Jan 2019, Tony Krowiak wrote: > > > >> /* > > >> +* A config change has happened, Force an ap bus

Re: [PATCH] s390/jump_label: Correct asm contraint

2019-02-20 Thread Heiko Carstens
On Sat, Feb 09, 2019 at 12:34:20PM -0800, Laura Abbott wrote: > On 2/5/19 12:43 PM, Heiko Carstens wrote: > >On Tue, Jan 29, 2019 at 08:25:58AM +0100, Laura Abbott wrote: > >>On 1/23/19 5:24 AM, Heiko Carstens wrote: > >>>On Wed, Jan 23, 2019 at 01:55:13PM +0100, Lau

Re: [PATCH] Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element.

2019-02-08 Thread Heiko Carstens
On Fri, Feb 08, 2019 at 08:11:10AM +0530, Allen wrote: > From: Allen Pais > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Allen Pais > --- > arch/s390/tools/gen_opcode_table.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] s390/jump_label: Correct asm contraint

2019-02-05 Thread Heiko Carstens
On Tue, Jan 29, 2019 at 08:25:58AM +0100, Laura Abbott wrote: > On 1/23/19 5:24 AM, Heiko Carstens wrote: > >On Wed, Jan 23, 2019 at 01:55:13PM +0100, Laura Abbott wrote: > >>There's a build failure with gcc9: > >> > >> ./arch/s390/include/asm/jump_label.h: A

<    1   2   3   4   5   6   7   8   9   10   >