Skip to content

Commit

Permalink
Merge branch 'mm-nonmm-unstable' into mm-everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Morton committed Oct 12, 2022
2 parents 7388577 + 424b64d commit 4891e76
Show file tree
Hide file tree
Showing 169 changed files with 1,315 additions and 694 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Filipe Lautert <filipe@icewall.org>
Finn Thain <fthain@linux-m68k.org> <fthain@telegraphics.com.au>
Franck Bui-Huu <vagabon.xyz@gmail.com>
Frank Rowand <frowand.list@gmail.com> <frank.rowand@am.sony.com>
Frank Rowand <frowand.list@gmail.com> <frank.rowand@sony.com>
Frank Rowand <frowand.list@gmail.com> <frank.rowand@sonymobile.com>
Frank Rowand <frowand.list@gmail.com> <frowand@mvista.com>
Frank Zago <fzago@systemfabricworks.com>
Expand Down
6 changes: 6 additions & 0 deletions Documentation/admin-guide/sysctl/kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ combining the following values:
4 s3_beep
= =======

arch
====

The machine hardware name, the same output as ``uname -m``
(e.g. ``x86_64`` or ``aarch64``).

auto_msgmni
===========
Expand Down Expand Up @@ -169,6 +174,7 @@ core_pattern
%f executable filename
%E executable path
%c maximum size of core file by resource limit RLIMIT_CORE
%C CPU the task ran on
%<OTHER> both are dropped
======== ==========================================

Expand Down
7 changes: 7 additions & 0 deletions Documentation/dev-tools/checkpatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,13 @@ Commit message

See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes

**BAD_FIXES_TAG**
The Fixes: tag is malformed or does not follow the community conventions.
This can occur if the tag have been split into multiple lines (e.g., when
pasted in an email program with word wrapping enabled).

See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes


Comparison style
----------------
Expand Down
10 changes: 4 additions & 6 deletions Documentation/fault-injection/fault-injection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ configuration of fault-injection capabilities.
- /sys/kernel/debug/fail*/times:

specifies how many times failures may happen at most. A value of -1
means "no limit". Note, though, that this file only accepts unsigned
values. So, if you want to specify -1, you better use 'printf' instead
of 'echo', e.g.: $ printf %#x -1 > times
means "no limit".

- /sys/kernel/debug/fail*/space:

Expand Down Expand Up @@ -284,7 +282,7 @@ Application Examples
echo Y > /sys/kernel/debug/$FAILTYPE/task-filter
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
echo -1 > /sys/kernel/debug/$FAILTYPE/times
echo 0 > /sys/kernel/debug/$FAILTYPE/space
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
Expand Down Expand Up @@ -338,7 +336,7 @@ Application Examples
echo N > /sys/kernel/debug/$FAILTYPE/task-filter
echo 10 > /sys/kernel/debug/$FAILTYPE/probability
echo 100 > /sys/kernel/debug/$FAILTYPE/interval
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
echo -1 > /sys/kernel/debug/$FAILTYPE/times
echo 0 > /sys/kernel/debug/$FAILTYPE/space
echo 2 > /sys/kernel/debug/$FAILTYPE/verbose
echo Y > /sys/kernel/debug/$FAILTYPE/ignore-gfp-wait
Expand Down Expand Up @@ -369,7 +367,7 @@ Application Examples
echo N > /sys/kernel/debug/$FAILTYPE/task-filter
echo 100 > /sys/kernel/debug/$FAILTYPE/probability
echo 0 > /sys/kernel/debug/$FAILTYPE/interval
printf %#x -1 > /sys/kernel/debug/$FAILTYPE/times
echo -1 > /sys/kernel/debug/$FAILTYPE/times
echo 0 > /sys/kernel/debug/$FAILTYPE/space
echo 1 > /sys/kernel/debug/$FAILTYPE/verbose

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CONFIG_NFSD=m
CONFIG_NLS_CODEPAGE_437=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_ALPHA_LEGACY_START_ADDRESS=y
CONFIG_MATHEMU=y
CONFIG_CRYPTO_HMAC=y
Expand Down
2 changes: 0 additions & 2 deletions arch/alpha/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ extern void start_thread(struct pt_regs *, unsigned long, unsigned long);

/* Free all resources held by a thread. */
struct task_struct;
extern void release_thread(struct task_struct *);

unsigned long __get_wchan(struct task_struct *p);

#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
Expand Down
5 changes: 0 additions & 5 deletions arch/alpha/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@ flush_thread(void)
current_thread_info()->pcb.unique = 0;
}

void
release_thread(struct task_struct *dead_task)
{
}

/*
* Copy architecture-specific thread state
*/
Expand Down
4 changes: 2 additions & 2 deletions arch/alpha/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ setup_arch(char **cmdline_p)
boot flags depending on the boot mode, we need some shorthand.
This should do for installation. */
if (strcmp(COMMAND_LINE, "INSTALL") == 0) {
strlcpy(command_line, "root=/dev/fd0 load_ramdisk=1", sizeof command_line);
strscpy(command_line, "root=/dev/fd0 load_ramdisk=1", sizeof(command_line));
} else {
strlcpy(command_line, COMMAND_LINE, sizeof command_line);
strscpy(command_line, COMMAND_LINE, sizeof(command_line));
}
strcpy(boot_command_line, command_line);
*cmdline_p = command_line;
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/configs/tb10x_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ CONFIG_TMPFS=y
CONFIG_CONFIGFS_FS=y
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_DEBUG_FS=y
CONFIG_HEADERS_INSTALL=y
Expand Down
3 changes: 0 additions & 3 deletions arch/arc/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ struct task_struct;
#define task_pt_regs(p) \
((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1)

/* Free all resources held by a thread */
#define release_thread(thread) do { } while (0)

/*
* A lot of busy-wait loops in SMP are based off of non-volatile data otherwise
* get optimised away by gcc
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset,
/* Forward declaration, a strange C thing */
struct task_struct;

/* Free all resources held by a thread. */
extern void release_thread(struct task_struct *);

unsigned long __get_wchan(struct task_struct *p);

#define task_pt_regs(p) \
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,6 @@ void flush_thread(void)
thread_notify(THREAD_NOTIFY_FLUSH, thread);
}

void release_thread(struct task_struct *dead_task)
{
}

asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");

int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
Expand Down
3 changes: 0 additions & 3 deletions arch/arm64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,6 @@ static inline bool is_ttbr1_addr(unsigned long addr)
/* Forward declaration, a strange C thing */
struct task_struct;

/* Free all resources held by a thread. */
extern void release_thread(struct task_struct *);

unsigned long __get_wchan(struct task_struct *p);

void update_sctlr_el1(u64 sctlr);
Expand Down
4 changes: 0 additions & 4 deletions arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ void flush_thread(void)
flush_tagged_addr_state();
}

void release_thread(struct task_struct *dead_task)
{
}

void arch_release_task_struct(struct task_struct *tsk)
{
fpsimd_release_task(tsk);
Expand Down
5 changes: 0 additions & 5 deletions arch/csky/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ do { \
/* Forward declaration, a strange C thing */
struct task_struct;

/* Free all resources held by a thread. */
static inline void release_thread(struct task_struct *dead_task)
{
}

/* Prepare to copy thread state - unlazy all lazy status */
#define prepare_to_copy(tsk) do { } while (0)

Expand Down
4 changes: 0 additions & 4 deletions arch/hexagon/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ struct thread_struct {
#define KSTK_EIP(tsk) (pt_elr(task_pt_regs(tsk)))
#define KSTK_ESP(tsk) (pt_psp(task_pt_regs(tsk)))

/* Free all resources held by a thread; defined in process.c */
extern void release_thread(struct task_struct *dead_task);

/* Get wait channel for task P. */
extern unsigned long __get_wchan(struct task_struct *p);

/* The following stuff is pretty HEXAGON specific. */
Expand Down
7 changes: 0 additions & 7 deletions arch/hexagon/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
return 0;
}

/*
* Release any architecture-specific resources locked by thread
*/
void release_thread(struct task_struct *dead_task)
{
}

/*
* Some archs flush debug and FPU info here
*/
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/configs/bigsur_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IPV6 is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=m
CONFIG_ATA=m
Expand Down Expand Up @@ -91,7 +90,6 @@ CONFIG_NFS_V4=m
CONFIG_NFSD=m
CONFIG_NFSD_V4=y
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
CONFIG_NLS_CODEPAGE_437=y
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/configs/generic_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_CONNECTOR=y
# CONFIG_PNP_DEBUG_MESSAGES is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_SGI_XP=m
Expand Down Expand Up @@ -91,7 +90,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_HW_RANDOM is not set
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RAW_DRIVER=m
CONFIG_HPET=y
CONFIG_AGP=m
CONFIG_AGP_I460=m
Expand Down
3 changes: 0 additions & 3 deletions arch/ia64/configs/gensparse_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ CONFIG_IP_MULTICAST=y
CONFIG_SYN_COOKIES=y
# CONFIG_IPV6 is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_ATA=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_ATA_GENERIC=y
CONFIG_PATA_CMD64X=y
CONFIG_ATA_PIIX=y
Expand Down Expand Up @@ -81,7 +79,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_HW_RANDOM is not set
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RAW_DRIVER=m
CONFIG_HPET=y
CONFIG_AGP=m
CONFIG_AGP_I460=m
Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/configs/tiger_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ CONFIG_IP_MULTICAST=y
CONFIG_SYN_COOKIES=y
# CONFIG_IPV6 is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_ATA=y
Expand Down Expand Up @@ -85,7 +84,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_HW_RANDOM is not set
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RAW_DRIVER=m
CONFIG_HPET=y
CONFIG_AGP=m
CONFIG_AGP_I460=m
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/configs/zx1_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ CONFIG_PATA_CMD64X=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_CHR_DEV_OSST=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_CONSTANTS=y
Expand Down
7 changes: 0 additions & 7 deletions arch/ia64/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,6 @@ struct thread_struct {
struct mm_struct;
struct task_struct;

/*
* Free all resources held by a thread. This is called after the
* parent of DEAD_TASK has collected the exit status of the task via
* wait().
*/
#define release_thread(dead_task)

/* Get wait channel for task P. */
extern unsigned long __get_wchan (struct task_struct *p);

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
p->parent = p->real_parent = p->group_leader = p;
INIT_LIST_HEAD(&p->children);
INIT_LIST_HEAD(&p->sibling);
strncpy(p->comm, type, sizeof(p->comm)-1);
strscpy(p->comm, type, sizeof(p->comm)-1);
}

/* Caller prevents this from being called after init */
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ setup_arch (char **cmdline_p)
ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);

*cmdline_p = __va(ia64_boot_param->command_line);
strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
strscpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);

efi_init();
io_port_init();
Expand Down
26 changes: 26 additions & 0 deletions arch/ia64/kernel/sys_ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,29 @@ ia64_mremap (unsigned long addr, unsigned long old_len, unsigned long new_len, u
force_successful_syscall_return();
return addr;
}

asmlinkage long
ia64_clock_getres(const clockid_t which_clock, struct __kernel_timespec __user *tp)
{
/*
* ia64's clock_gettime() syscall is implemented as a vdso call
* fsys_clock_gettime(). Currently it handles only
* CLOCK_REALTIME and CLOCK_MONOTONIC. Both are based on
* 'ar.itc' counter which gets incremented at a constant
* frequency. It's usually 400MHz, ~2.5x times slower than CPU
* clock frequency. Which is almost a 1ns hrtimer, but not quite.
*
* Let's special-case these timers to report correct precision
* based on ITC frequency and not HZ frequency for supported
* clocks.
*/
switch (which_clock) {
case CLOCK_REALTIME:
case CLOCK_MONOTONIC:
s64 tick_ns = DIV_ROUND_UP(NSEC_PER_SEC, local_cpu_data->itc_freq);
struct timespec64 rtn_tp = ns_to_timespec64(tick_ns);
return put_timespec64(&rtn_tp, tp);
}

return sys_clock_getres(which_clock, tp);
}
2 changes: 1 addition & 1 deletion arch/ia64/kernel/syscalls/syscall.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
228 common timer_delete sys_timer_delete
229 common clock_settime sys_clock_settime
230 common clock_gettime sys_clock_gettime
231 common clock_getres sys_clock_getres
231 common clock_getres ia64_clock_getres
232 common clock_nanosleep sys_clock_nanosleep
233 common fstatfs64 sys_fstatfs64
234 common statfs64 sys_statfs64
Expand Down
3 changes: 0 additions & 3 deletions arch/loongarch/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ struct thread_struct {

struct task_struct;

/* Free all resources held by a thread. */
#define release_thread(thread) do { } while (0)

enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, IDLE_POLL};

extern unsigned long boot_option_idle_override;
Expand Down
5 changes: 0 additions & 5 deletions arch/m68k/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
/* Forward declaration, a strange C thing */
struct task_struct;

/* Free all resources held by a thread. */
static inline void release_thread(struct task_struct *dead_task)
{
}

unsigned long __get_wchan(struct task_struct *p);
void show_registers(struct pt_regs *regs);

Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/configs/mmu_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ CONFIG_CIFS=y
CONFIG_CIFS_STATS2=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_DMA_CMA=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_KGDB=y
CONFIG_KGDB_TESTS=y
CONFIG_KGDB_KDB=y
Expand Down
Loading

0 comments on commit 4891e76

Please sign in to comment.