Skip to content

Commit

Permalink
Merge tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/rw/uml

Pull UML updates from Richard Weinberger:

 - Disable CONFIG_GCOV when built with modules

 - Many fixes for W=1 related warnings

 - Code cleanup

* tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
  um: Fix W=1 missing-include-dirs warnings
  um: elf.h: Fix W=1 warning for empty body in 'do' statement
  um: pgtable.h: Fix W=1 warning for empty body in 'do' statement
  um: Remove unused including <linux/version.h>
  um: Add 2 missing libs to fix various build errors
  um: Replace if (cond) BUG() with BUG_ON()
  um: Disable CONFIG_GCOV with MODULES
  um: Remove unneeded variable 'ret'
  um: Mark all kernel symbols as local
  um: Fix tag order in stub_32.h
  • Loading branch information
torvalds committed May 5, 2021
2 parents 51f6294 + ed102bf commit d665ea6
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 26 deletions.
1 change: 1 addition & 0 deletions arch/um/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ config GCOV
bool "Enable gcov support"
depends on DEBUG_INFO
depends on !KCOV
depends on !MODULES
help
This option allows developers to retrieve coverage data from a UML
session.
Expand Down
4 changes: 1 addition & 3 deletions arch/um/drivers/hostaudio_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,11 @@ static ssize_t hostaudio_write(struct file *file, const char __user *buffer,
static __poll_t hostaudio_poll(struct file *file,
struct poll_table_struct *wait)
{
__poll_t mask = 0;

#ifdef DEBUG
printk(KERN_DEBUG "hostaudio: poll called (unimplemented)\n");
#endif

return mask;
return 0;
}

static long hostaudio_ioctl(struct file *file,
Expand Down
1 change: 0 additions & 1 deletion arch/um/drivers/vector_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* Copyright (C) 2001 by various other people who didn't put their name here.
*/

#include <linux/version.h>
#include <linux/memblock.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/um/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
struct mm_struct;
extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr);

#define update_mmu_cache(vma,address,ptep) do ; while (0)
#define update_mmu_cache(vma,address,ptep) do {} while (0)

/* Encode and de-code a swap entry */
#define __swp_type(x) (((x).val >> 5) & 0x1f)
Expand Down
1 change: 1 addition & 0 deletions arch/um/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SPDX-License-Identifier: GPL-2.0
1 change: 0 additions & 1 deletion arch/um/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \

obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
obj-$(CONFIG_GPROF) += gprof_syms.o
obj-$(CONFIG_GCOV) += gmon_syms.o
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o

Expand Down
6 changes: 6 additions & 0 deletions arch/um/kernel/dyn.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)
ENTRY(_start)
jiffies = jiffies_64;

VERSION {
{
local: *;
};
}

SECTIONS
{
PROVIDE (__executable_start = START);
Expand Down
16 changes: 0 additions & 16 deletions arch/um/kernel/gmon_syms.c

This file was deleted.

3 changes: 1 addition & 2 deletions arch/um/kernel/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ static void __init one_page_table_init(pmd_t *pmd)

set_pmd(pmd, __pmd(_KERNPG_TABLE +
(unsigned long) __pa(pte)));
if (pte != pte_offset_kernel(pmd, 0))
BUG();
BUG_ON(pte != pte_offset_kernel(pmd, 0));
}
}

Expand Down
6 changes: 6 additions & 0 deletions arch/um/kernel/uml.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ OUTPUT_ARCH(ELF_ARCH)
ENTRY(_start)
jiffies = jiffies_64;

VERSION {
{
local: *;
};
}

SECTIONS
{
/* This must contain the right address - not quite the default ELF one.*/
Expand Down
1 change: 1 addition & 0 deletions arch/x86/um/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ obj-y += checksum_32.o syscalls_32.o
obj-$(CONFIG_ELF_CORE) += elfcore.o

subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o
subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o
subarch-y += ../kernel/sys_ia32.o

else
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/um/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,6 @@ extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu);
extern long elf_aux_hwcap;
#define ELF_HWCAP (elf_aux_hwcap)

#define SET_PERSONALITY(ex) do ; while(0)
#define SET_PERSONALITY(ex) do {} while(0)

#endif
2 changes: 1 addition & 1 deletion arch/x86/um/shared/sysdep/stub_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static inline void trap_myself(void)
__asm("int3");
}

static void inline remap_stack_and_trap(void)
static inline void remap_stack_and_trap(void)
{
__asm__ volatile (
"movl %%esp,%%ebx ;"
Expand Down

0 comments on commit d665ea6

Please sign in to comment.