Commit 9cc220a4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 updates from Alexander Gordeev:

 - Refactor SCLP memory hotplug code

 - Introduce common boot_panic() decompressor helper macro and use it to
   get rid of nearly few identical implementations

 - Take into account additional key generation flags and forward it to
   the ep11 implementation. With that allow users to modify the key
   generation process, e.g. provide valid combinations of XCP_BLOB_*
   flags

 - Replace kmalloc() + copy_from_user() with memdup_user_nul() in s390
   debug facility and HMC driver

 - Add DAX support for DCSS memory block devices

 - Make the compiler statement attribute "assume" available with a new
   __assume macro

 - Rework ffs() and fls() family bitops functions, including source code
   improvements and generated code optimizations. Use the newly
   introduced __assume macro for that

 - Enable additional network features in default configurations

 - Use __GFP_ACCOUNT flag for user page table allocations to add missing
   kmemcg accounting

 - Add WQ_PERCPU flag to explicitly request the use of the per-CPU
   workqueue for 3590 tape driver

 - Switch power reading to the per-CPU and the Hiperdispatch to the
   default workqueue

 - Add memory allocation profiling hooks to allow better profiling data
   and the /proc/allocinfo output similar to other architectures

* tag 's390-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (21 commits)
  s390/mm: Add memory allocation profiling hooks
  s390: Replace use of system_wq with system_dfl_wq
  s390/diag324: Replace use of system_wq with system_percpu_wq
  s390/tape: Add WQ_PERCPU to alloc_workqueue users
  s390/bitops: Switch to generic ffs() if supported by compiler
  s390/bitops: Switch to generic fls(), fls64(), etc.
  s390/mm: Use __GFP_ACCOUNT for user page table allocations
  s390/configs: Enable additional network features
  s390/bitops: Cleanup __flogr()
  s390/bitops: Use __assume() for __flogr() inline assembly return value
  compiler_types: Add __assume macro
  s390/bitops: Limit return value range of __flogr()
  s390/dcssblk: Add DAX support
  s390/hmcdrv: Replace kmalloc() + copy_from_user() with memdup_user_nul()
  s390/debug: Replace kmalloc() + copy_from_user() with memdup_user_nul()
  s390/pkey: Forward keygenflags to ep11_unwrapkey
  s390/boot: Add common boot_panic() code
  s390/bitops: Optimize inlining
  s390/bitops: Slightly optimize ffs() and fls64()
  s390/sclp: Move memory hotplug code for better modularity
  ...
parents f1004b2f 088bb10e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -49,6 +49,13 @@ config KASAN_SHADOW_OFFSET
	depends on KASAN
	default 0x1C000000000000

config CC_HAS_BUILTIN_FFS
	def_bool !(CC_IS_GCC && GCC_VERSION < 160000)
	help
	  GCC versions before 16.0.0 generate library calls to ffs()
	  for __builtin_ffs() even when __has_builtin(__builtin_ffs)
	  is true.

config CC_ASM_FLAG_OUTPUT_BROKEN
	def_bool CC_IS_GCC && GCC_VERSION < 140200
	help
+8 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include <linux/printk.h>
#include <asm/physmem_info.h>
#include <asm/stacktrace.h>

struct vmlinux_info {
	unsigned long entry;
@@ -89,6 +90,13 @@ void __noreturn jump_to_kernel(psw_t *psw);
#define boot_info(fmt, ...)	boot_printk(KERN_INFO boot_fmt(fmt), ##__VA_ARGS__)
#define boot_debug(fmt, ...)	boot_printk(KERN_DEBUG boot_fmt(fmt), ##__VA_ARGS__)

#define boot_panic(...) do {				\
	boot_emerg(__VA_ARGS__);			\
	print_stacktrace(current_frame_address());	\
	boot_emerg(" -- System halted\n");		\
	disabled_wait();				\
} while (0)

extern struct machine_info machine;
extern int boot_console_loglevel;
extern bool boot_ignore_loglevel;
+1 −3
Original line number Diff line number Diff line
@@ -68,9 +68,7 @@ static void decompress_error(char *m)
{
	if (bootdebug)
		boot_rb_dump();
	boot_emerg("Decompression error: %s\n", m);
	boot_emerg(" -- System halted\n");
	disabled_wait();
	boot_panic("Decompression error: %s\n", m);
}

unsigned long mem_safe_offset(void)
+1 −3
Original line number Diff line number Diff line
@@ -228,9 +228,7 @@ static void die_oom(unsigned long size, unsigned long align, unsigned long min,
	boot_emerg("Usable online memory total: %lu Reserved: %lu Free: %lu\n",
		   total_mem, total_reserved_mem,
		   total_mem > total_reserved_mem ? total_mem - total_reserved_mem : 0);
	print_stacktrace(current_frame_address());
	boot_emerg(" -- System halted\n");
	disabled_wait();
	boot_panic("Oom\n");
}

static void _physmem_reserve(enum reserved_range_type type, unsigned long addr, unsigned long size)
+3 −10
Original line number Diff line number Diff line
@@ -44,13 +44,6 @@ u64 __bootdata_preserved(clock_comparator_max) = -1UL;
u64 __bootdata_preserved(stfle_fac_list[16]);
struct oldmem_data __bootdata_preserved(oldmem_data);

void error(char *x)
{
	boot_emerg("%s\n", x);
	boot_emerg(" -- System halted\n");
	disabled_wait();
}

static char sysinfo_page[PAGE_SIZE] __aligned(PAGE_SIZE);

static void detect_machine_type(void)
@@ -220,10 +213,10 @@ static void rescue_initrd(unsigned long min, unsigned long max)
static void copy_bootdata(void)
{
	if (__boot_data_end - __boot_data_start != vmlinux.bootdata_size)
		error(".boot.data section size mismatch");
		boot_panic(".boot.data section size mismatch\n");
	memcpy((void *)vmlinux.bootdata_off, __boot_data_start, vmlinux.bootdata_size);
	if (__boot_data_preserved_end - __boot_data_preserved_start != vmlinux.bootdata_preserved_size)
		error(".boot.preserved.data section size mismatch");
		boot_panic(".boot.preserved.data section size mismatch\n");
	memcpy((void *)vmlinux.bootdata_preserved_off, __boot_data_preserved_start, vmlinux.bootdata_preserved_size);
}

@@ -237,7 +230,7 @@ static void kaslr_adjust_relocs(unsigned long min_addr, unsigned long max_addr,
	for (reloc = (int *)__vmlinux_relocs_64_start; reloc < (int *)__vmlinux_relocs_64_end; reloc++) {
		loc = (long)*reloc + phys_offset;
		if (loc < min_addr || loc > max_addr)
			error("64-bit relocation outside of kernel!\n");
			boot_panic("64-bit relocation outside of kernel!\n");
		*(u64 *)loc += offset;
	}
}
Loading