Merge tag 's390-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Sep 2021 19:55:12 +0000 (12:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Sep 2021 19:55:12 +0000 (12:55 -0700)
Pull more s390 updates from Heiko Carstens:
 "Except for the xpram device driver removal it is all about fixes and
  cleanups.

   - Fix topology update on cpu hotplug, so notifiers see expected
     masks. This bug was uncovered with SCHED_CORE support.

   - Fix stack unwinding so that the correct number of entries are
     omitted like expected by common code. This fixes KCSAN selftests.

   - Add kmemleak annotation to stack_alloc to avoid false positive
     kmemleak warnings.

   - Avoid layering violation in common I/O code and don't unregister
     subchannel from child-drivers.

   - Remove xpram device driver for which no real use case exists since
     the kernel is 64 bit only. Also all hypervisors got required
     support removed in the meantime, which means the xpram device
     driver is dead code.

   - Fix -ENODEV handling of clp_get_state in our PCI code.

   - Enable KFENCE in debug defconfig.

   - Cleanup hugetlbfs s390 specific Kconfig dependency.

   - Quite a lot of trivial fixes to get rid of "W=1" warnings, and and
     other simple cleanups"

* tag 's390-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  hugetlbfs: s390 is always 64bit
  s390/ftrace: remove incorrect __va usage
  s390/zcrypt: remove incorrect kernel doc indicators
  scsi: zfcp: fix kernel doc comments
  s390/sclp: add __nonstring annotation
  s390/hmcdrv_ftp: fix kernel doc comment
  s390: remove xpram device driver
  s390/pci: read clp_list_pci_req only once
  s390/pci: fix clp_get_state() handling of -ENODEV
  s390/cio: fix kernel doc comment
  s390/ctrlchar: fix kernel doc comment
  s390/con3270: use proper type for tasklet function
  s390/cpum_cf: move array from header to C file
  s390/mm: fix kernel doc comments
  s390/topology: fix topology information when calling cpu hotplug notifiers
  s390/unwind: use current_frame_address() to unwind current task
  s390/configs: enable CONFIG_KFENCE in debug_defconfig
  s390/entry: make oklabel within CHKSTG macro local
  s390: add kmemleak annotation in stack_alloc()
  s390/cio: dont unregister subchannel from child-drivers

1  2 
arch/s390/Kconfig
arch/s390/kernel/setup.c
drivers/s390/cio/device.c
drivers/s390/scsi/zfcp_fsf.c
fs/Kconfig

diff --combined arch/s390/Kconfig
@@@ -110,6 -110,7 +110,7 @@@ config S39
        select ARCH_STACKWALK
        select ARCH_SUPPORTS_ATOMIC_RMW
        select ARCH_SUPPORTS_DEBUG_PAGEALLOC
+       select ARCH_SUPPORTS_HUGETLBFS
        select ARCH_SUPPORTS_NUMA_BALANCING
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_CMPXCHG_LOCKREF
        select SWIOTLB
        select SYSCTL_EXCEPTION_TRACE
        select THREAD_INFO_IN_TASK
 +      select TRACE_IRQFLAGS_SUPPORT
        select TTY
        select VIRT_CPU_ACCOUNTING
        select ZONE_DMA
diff --combined arch/s390/kernel/setup.c
@@@ -50,6 -50,7 +50,7 @@@
  #include <linux/compat.h>
  #include <linux/start_kernel.h>
  #include <linux/hugetlb.h>
+ #include <linux/kmemleak.h>
  
  #include <asm/boot_data.h>
  #include <asm/ipl.h>
@@@ -356,9 -357,12 +357,12 @@@ void *restart_stack
  unsigned long stack_alloc(void)
  {
  #ifdef CONFIG_VMAP_STACK
-       return (unsigned long)__vmalloc_node(THREAD_SIZE, THREAD_SIZE,
-                       THREADINFO_GFP, NUMA_NO_NODE,
-                       __builtin_return_address(0));
+       void *ret;
+       ret = __vmalloc_node(THREAD_SIZE, THREAD_SIZE, THREADINFO_GFP,
+                            NUMA_NO_NODE, __builtin_return_address(0));
+       kmemleak_not_leak(ret);
+       return (unsigned long)ret;
  #else
        return __get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER);
  #endif
@@@ -677,9 -681,8 +681,9 @@@ static void __init reserve_crashkernel(
                        return;
                }
                low = crash_base ?: low;
 -              crash_base = memblock_find_in_range(low, high, crash_size,
 -                                                  KEXEC_CRASH_MEM_ALIGN);
 +              crash_base = memblock_phys_alloc_range(crash_size,
 +                                                     KEXEC_CRASH_MEM_ALIGN,
 +                                                     low, high);
        }
  
        if (!crash_base) {
                return;
        }
  
 -      if (register_memory_notifier(&kdump_mem_nb))
 +      if (register_memory_notifier(&kdump_mem_nb)) {
 +              memblock_free(crash_base, crash_size);
                return;
 +      }
  
        if (!oldmem_data.start && MACHINE_IS_VM)
                diag10_range(PFN_DOWN(crash_base), PFN_DOWN(crash_size));
@@@ -137,7 -137,7 +137,7 @@@ static int ccw_uevent(struct device *de
  
  static void io_subchannel_irq(struct subchannel *);
  static int io_subchannel_probe(struct subchannel *);
 -static int io_subchannel_remove(struct subchannel *);
 +static void io_subchannel_remove(struct subchannel *);
  static void io_subchannel_shutdown(struct subchannel *);
  static int io_subchannel_sch_event(struct subchannel *, int);
  static int io_subchannel_chp_event(struct subchannel *, struct chp_link *,
@@@ -867,19 -867,6 +867,6 @@@ out_err
                wake_up(&ccw_device_init_wq);
  }
  
- static void ccw_device_call_sch_unregister(struct ccw_device *cdev)
- {
-       struct subchannel *sch;
-       /* Get subchannel reference for local processing. */
-       if (!get_device(cdev->dev.parent))
-               return;
-       sch = to_subchannel(cdev->dev.parent);
-       css_sch_device_unregister(sch);
-       /* Release subchannel reference for local processing. */
-       put_device(&sch->dev);
- }
  /*
   * subchannel recognition done. Called from the state machine.
   */
@@@ -1101,7 -1088,7 +1088,7 @@@ out_schedule
        return 0;
  }
  
 -static int io_subchannel_remove(struct subchannel *sch)
 +static void io_subchannel_remove(struct subchannel *sch)
  {
        struct io_subchannel_private *io_priv = to_io_private(sch);
        struct ccw_device *cdev;
@@@ -1120,6 -1107,7 +1107,6 @@@ out_free
                          io_priv->dma_area, io_priv->dma_area_dma);
        kfree(io_priv);
        sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
 -      return 0;
  }
  
  static void io_subchannel_verify(struct subchannel *sch)
@@@ -1741,7 -1729,7 +1728,7 @@@ ccw_device_probe (struct device *dev
        return 0;
  }
  
 -static int ccw_device_remove(struct device *dev)
 +static void ccw_device_remove(struct device *dev)
  {
        struct ccw_device *cdev = to_ccwdev(dev);
        struct ccw_driver *cdrv = cdev->drv;
        spin_unlock_irq(cdev->ccwlock);
        io_subchannel_quiesce(sch);
        __disable_cmf(cdev);
 -
 -      return 0;
  }
  
  static void ccw_device_shutdown(struct device *dev)
@@@ -1857,10 -1847,10 +1844,10 @@@ static void ccw_device_todo(struct work
                        css_schedule_eval(sch->schid);
                fallthrough;
        case CDEV_TODO_UNREG:
-               if (sch_is_pseudo_sch(sch))
-                       ccw_device_unregister(cdev);
-               else
-                       ccw_device_call_sch_unregister(cdev);
+               spin_lock_irq(sch->lock);
+               sch_set_cdev(sch, NULL);
+               spin_unlock_irq(sch->lock);
+               ccw_device_unregister(cdev);
                break;
        default:
                break;
@@@ -2275,7 -2275,7 +2275,7 @@@ static void zfcp_fsf_close_lun_handler(
  }
  
  /**
-  * zfcp_fsf_close_LUN - close LUN
+  * zfcp_fsf_close_lun - close LUN
   * @erp_action: pointer to erp_action triggering the "close LUN"
   * Returns: 0 on success, error otherwise
   */
@@@ -2377,7 -2377,7 +2377,7 @@@ static void zfcp_fsf_req_trace(struct z
                }
        }
  
 -      blk_add_driver_data(scsi->request, &blktrc, sizeof(blktrc));
 +      blk_add_driver_data(scsi_cmd_to_rq(scsi), &blktrc, sizeof(blktrc));
  }
  
  /**
@@@ -2599,8 -2599,8 +2599,8 @@@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd 
        io->fcp_cmnd_length = FCP_CMND_LEN;
  
        if (scsi_get_prot_op(scsi_cmnd) != SCSI_PROT_NORMAL) {
 -              io->data_block_length = scsi_cmnd->device->sector_size;
 -              io->ref_tag_value = scsi_get_lba(scsi_cmnd) & 0xFFFFFFFF;
 +              io->data_block_length = scsi_prot_interval(scsi_cmnd);
 +              io->ref_tag_value = scsi_prot_ref_tag(scsi_cmnd);
        }
  
        if (zfcp_fsf_set_data_dir(scsi_cmnd, &io->data_direction))
diff --combined fs/Kconfig
@@@ -43,7 -43,7 +43,7 @@@ source "fs/f2fs/Kconfig
  source "fs/zonefs/Kconfig"
  
  config FS_DAX
 -      bool "Direct Access (DAX) support"
 +      bool "File system based Direct Access (DAX) support"
        depends on MMU
        depends on !(ARM || MIPS || SPARC)
        select DEV_PAGEMAP_OPS if (ZONE_DEVICE && !FS_DAX_LIMITED)
          Direct Access (DAX) can be used on memory-backed block devices.
          If the block device supports DAX and the filesystem supports DAX,
          then you can avoid using the pagecache to buffer I/Os.  Turning
 -        on this option will compile in support for DAX; you will need to
 -        mount the filesystem using the -o dax option.
 +        on this option will compile in support for DAX.
 +
 +        For a DAX device to support file system access it needs to have
 +        struct pages.  For the nfit based NVDIMMs this can be enabled
 +        using the ndctl utility:
 +
 +              # ndctl create-namespace --force --reconfig=namespace0.0 \
 +                      --mode=fsdax --map=mem
 +
 +        See the 'create-namespace' man page for details on the overhead of
 +        --map=mem:
 +        https://docs.pmem.io/ndctl-user-guide/ndctl-man-pages/ndctl-create-namespace
 +
 +          For ndctl to work CONFIG_DEV_DAX needs to be enabled as well. For most
 +        file systems DAX support needs to be manually enabled globally or
 +        per-inode using a mount option as well.  See the file documentation in
 +        Documentation/filesystems/dax.rst for details.
  
          If you do not have a block device that is capable of using this,
          or if unsure, say N.  Saying Y will increase the size of the kernel
@@@ -151,7 -136,6 +151,7 @@@ menu "DOS/FAT/EXFAT/NT Filesystems
  source "fs/fat/Kconfig"
  source "fs/exfat/Kconfig"
  source "fs/ntfs/Kconfig"
 +source "fs/ntfs3/Kconfig"
  
  endmenu
  endif # BLOCK
@@@ -234,8 -218,7 +234,7 @@@ config ARCH_SUPPORTS_HUGETLBF
  
  config HUGETLBFS
        bool "HugeTLB file system support"
-       depends on X86 || IA64 || SPARC64 || (S390 && 64BIT) || \
-                  ARCH_SUPPORTS_HUGETLBFS || BROKEN
+       depends on X86 || IA64 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
        help
          hugetlbfs is a filesystem backing for HugeTLB pages, based on
          ramfs. For architectures that support it, say Y here and read
@@@ -364,15 -347,7 +363,15 @@@ config NFS_V4_2_SSC_HELPE
  
  source "net/sunrpc/Kconfig"
  source "fs/ceph/Kconfig"
 +
  source "fs/cifs/Kconfig"
 +source "fs/ksmbd/Kconfig"
 +
 +config CIFS_COMMON
 +      tristate
 +      default y if CIFS=y
 +      default m if CIFS=m
 +
  source "fs/coda/Kconfig"
  source "fs/afs/Kconfig"
  source "fs/9p/Kconfig"