1. Oct 25, 2023
  2. Oct 24, 2023
  3. Oct 19, 2023
    • Thomas Richter's avatar
      s390/pai_crypto: dynamically allocate percpu pai crypto map data structure · 60f8f641
      Thomas Richter authored
      
      
      Struct paicrypt_map is a data structure and is statically defined
      for each possible CPU. Rework this and replace it by dynamically
      allocated data structures created when a perf_event_open() system call
      is invoked.
      
      It is replaced by an array of pointers to all possible CPUs and
      reference counting. The array of pointers is allocated when the first
      event is created. For each online CPU an event is installed on, a struct
      paicrypt_map is allocated and a pointer to struct cpu_cf_events is
      stored in the array:
      
                              CPU   0   1   2   3    ...  N
                                    +---+---+---+---+---+---+
           paicrypt_root::mapptr--> | * |   |   |   |...|   |
                                    +-|-+---+---+---+---+---+
                                      |
                                      |
                                     \|/
                              +--------------+
                              | paicrypt_map |
                              +--------------+
      
      With this approach the large data structure is only allocated when
      an event is actually installed and used.
      Also implement proper reference counting for allocation and removal.
      
      PAI crypto counter events can not be created when a CPU hot plug
      add is processed. This means a CPU hot plug add does not get
      the necessary PAI event to record PAI cryptography counter increments
      on the newly added CPU. There is no possibility to notify user space
      of a new CPU and the necessary event infrastructure assoiciated with
      the file descriptor returned by perf_event_open() system call.
      However system call perf_event_open() can use the newly added CPU
      when issued after the CPU hot plug add.
      
      Kernel CPU hot plug remove deletes the CPU and stops the PAI counters on
      that CPU. When the process closes the file descriptor associated
      with that event, the event's destroy() function removes any
      allocated data structures and adjusts the reference counts.
      
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      60f8f641
    • Heiko Carstens's avatar
      s390/mm: make vmemmap_free() only for CONFIG_MEMORY_HOTPLUG available · 4f62c6e3
      Heiko Carstens authored
      
      
      Get rid of this W=1 compile warning:
      
      arch/s390/mm/vmem.c:502:6: warning: no previous prototype for ‘vmemmap_free’ [-Wmissing-prototypes]
        502 | void vmemmap_free(unsigned long start, unsigned long end,
            |      ^~~~~~~~~~~~
      
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      4f62c6e3
    • Heiko Carstens's avatar
      s390/mm: remove __GFP_HIGHMEM masking · 7bc8b8eb
      Heiko Carstens authored
      Remove unnecessary __GFP_HIGHMEM masking, which was introduced with
      commit 6326c26c ("s390: convert various pgalloc functions to use
      ptdescs"). Also remove a whitespace change which was introduced with
      the same commit.
      
      Link: https://lore.kernel.org/all/CAOzc2px-SFSnmjcPriiB3cm1fNj3+YC8S0VSp4t1QvDR0f4E2A@mail.gmail.com
      
      
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      7bc8b8eb
  4. Oct 16, 2023