Skip to content

Commit

Permalink
v20200404
Browse files Browse the repository at this point in the history
  • Loading branch information
150balbes committed Apr 4, 2020
1 parent 5abc37e commit b7fd10d
Show file tree
Hide file tree
Showing 174 changed files with 3,034 additions and 1,591 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ modules.order
/include/ksym/
/arch/*/include/generated/

# Generated lkdtm tests
/tools/testing/selftests/lkdtm/*.sh
!/tools/testing/selftests/lkdtm/run.sh

# stgit generated dirs
patches-*

Expand Down
2 changes: 1 addition & 1 deletion Documentation/kbuild/kbuild.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ This is solely useful to speed up test compiles.
KBUILD_EXTRA_SYMBOLS
--------------------
For modules that use symbols from other modules.
See more details in modules.txt.
See more details in modules.rst.

ALLSOURCE_ARCHS
---------------
Expand Down
2 changes: 1 addition & 1 deletion Documentation/kbuild/kconfig-macro-language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ intermediate::
def_bool y

Then, Kconfig moves onto the evaluation stage to resolve inter-symbol
dependency as explained in kconfig-language.txt.
dependency as explained in kconfig-language.rst.


Variables
Expand Down
6 changes: 3 additions & 3 deletions Documentation/kbuild/makefiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ When kbuild executes, the following steps are followed (roughly):
$(KBUILD_AFLAGS_MODULE) is used to add arch-specific options that
are used for assembler.

From commandline AFLAGS_MODULE shall be used (see kbuild.txt).
From commandline AFLAGS_MODULE shall be used (see kbuild.rst).

KBUILD_CFLAGS_KERNEL
$(CC) options specific for built-in
Expand All @@ -937,15 +937,15 @@ When kbuild executes, the following steps are followed (roughly):

$(KBUILD_CFLAGS_MODULE) is used to add arch-specific options that
are used for $(CC).
From commandline CFLAGS_MODULE shall be used (see kbuild.txt).
From commandline CFLAGS_MODULE shall be used (see kbuild.rst).

KBUILD_LDFLAGS_MODULE
Options for $(LD) when linking modules

$(KBUILD_LDFLAGS_MODULE) is used to add arch-specific options
used when linking modules. This is often a linker script.

From commandline LDFLAGS_MODULE shall be used (see kbuild.txt).
From commandline LDFLAGS_MODULE shall be used (see kbuild.rst).

KBUILD_LDS

Expand Down
4 changes: 2 additions & 2 deletions Documentation/kbuild/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ build.

The syntax of the Module.symvers file is::

<CRC> <Symbol> <Namespace> <Module> <Export Type>
<CRC> <Symbol> <Module> <Export Type> <Namespace>

0xe1cc2a05 usb_stor_suspend USB_STORAGE drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL
0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE

The fields are separated by tabs and values may be empty (e.g.
if no namespace is defined for an exported symbol).
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
VERSION = 5
PATCHLEVEL = 6
SUBLEVEL = 0
EXTRAVERSION = -rc6
EXTRAVERSION = -rc7
NAME = Kleptomaniac Octopus

# *DOCUMENTATION*
Expand Down Expand Up @@ -1804,7 +1804,7 @@ existing-targets := $(wildcard $(sort $(targets)))

-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)

endif # config-targets
endif # config-build
endif # mixed-build
endif # need-sub-make

Expand Down
4 changes: 3 additions & 1 deletion arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,15 @@ endif
ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
prepare: stack_protector_prepare
stack_protector_prepare: prepare0
$(eval KBUILD_CFLAGS += \
$(eval SSP_PLUGIN_CFLAGS := \
-fplugin-arg-arm_ssp_per_task_plugin-tso=$(shell \
awk '{if ($$2 == "THREAD_SZ_ORDER") print $$3;}'\
include/generated/asm-offsets.h) \
-fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \
awk '{if ($$2 == "TI_STACK_CANARY") print $$3;}'\
include/generated/asm-offsets.h))
$(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS))
$(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS))
endif

all: $(notdir $(KBUILD_IMAGE))
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \
$(libfdt) $(libfdt_hdrs) hyp-stub.S

KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS += $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)

ifeq ($(CONFIG_FUNCTION_TRACER),y)
ORIG_CFLAGS := $(KBUILD_CFLAGS)
Expand All @@ -117,7 +116,8 @@ CFLAGS_fdt_ro.o := $(nossp-flags-y)
CFLAGS_fdt_rw.o := $(nossp-flags-y)
CFLAGS_fdt_wip.o := $(nossp-flags-y)

ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
-I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
asflags-y := -DZIMAGE

# Supply kernel BSS size to the decompressor via a linker symbol.
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@

bluetooth {
compatible = "brcm,bcm43438-bt";
max-speed = <1500000>;
clocks = <&rtc 1>;
clock-names = "lpo";
vbat-supply = <&reg_vcc3v3>;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static bool __init cntvct_functional(void)
* this.
*/
np = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
if (!np)
np = of_find_compatible_node(NULL, NULL, "arm,armv8-timer");
if (!np)
goto out_put;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/lib/copy_from_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ENTRY(arm_copy_from_user)

ENDPROC(arm_copy_from_user)

.pushsection .fixup,"ax"
.pushsection .text.fixup,"ax"
.align 0
copy_abort_preamble
ldmfd sp!, {r1, r2, r3}
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
realtek,config-magic-for-pine64;
};
};

Expand Down
32 changes: 32 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@
};

hdmi: hdmi@1ee0000 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun50i-a64-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
Expand Down Expand Up @@ -1150,6 +1151,37 @@
#phy-cells = <0>;
};

i2s2: i2s@1c22800 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun8i-h3-i2s";
reg = <0x01c22800 0x400>;
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
clock-names = "apb", "mod";
dmas = <&dma 27>;
resets = <&ccu RST_BUS_I2S2>;
dma-names = "tx";
allwinner,playback-channels = <8>;
};

sound_hdmi: sound_hdmi {
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "allwinner-hdmi";
simple-audio-card,mclk-fs = <128>;
simple-audio-card,frame-inversion;

simple-audio-card,codec {
sound-dai = <&hdmi>;
};

simple-audio-card,cpu {
sound-dai = <&i2s2>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
};

rtc: rtc@1f00000 {
compatible = "allwinner,sun50i-a64-rtc",
"allwinner,sun8i-h3-rtc";
Expand Down
8 changes: 4 additions & 4 deletions arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@
};
};

&cpu0 {
cpu-supply = <&reg_vdd_cpux>;
};

&codec {
allwinner,audio-routing =
"Line Out", "LINEOUT",
Expand All @@ -97,6 +93,10 @@
status = "okay";
};

&cpu0 {
cpu-supply = <&reg_vdd_cpux>;
};

&de {
status = "okay";
};
Expand Down
8 changes: 0 additions & 8 deletions arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,3 @@
&vopb_mmu {
status = "okay";
};

&vopl {
status = "okay";
};

&vopl_mmu {
status = "okay";
};
4 changes: 1 addition & 3 deletions arch/arm64/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ typedef struct {
*/
#define ASID(mm) ((mm)->context.id.counter & 0xffff)

extern bool arm64_use_ng_mappings;

static inline bool arm64_kernel_unmapped_at_el0(void)
{
return arm64_use_ng_mappings;
return cpus_have_const_cap(ARM64_UNMAP_KERNEL_AT_EL0);
}

typedef void (*bp_hardening_cb_t)(void);
Expand Down
6 changes: 4 additions & 2 deletions arch/arm64/include/asm/pgtable-prot.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@

#include <asm/pgtable-types.h>

extern bool arm64_use_ng_mappings;

#define _PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_SHARED)
#define _PROT_SECT_DEFAULT (PMD_TYPE_SECT | PMD_SECT_AF | PMD_SECT_S)

#define PTE_MAYBE_NG (arm64_kernel_unmapped_at_el0() ? PTE_NG : 0)
#define PMD_MAYBE_NG (arm64_kernel_unmapped_at_el0() ? PMD_SECT_NG : 0)
#define PTE_MAYBE_NG (arm64_use_ng_mappings ? PTE_NG : 0)
#define PMD_MAYBE_NG (arm64_use_ng_mappings ? PMD_SECT_NG : 0)

#define PROT_DEFAULT (_PROT_DEFAULT | PTE_MAYBE_NG)
#define PROT_SECT_DEFAULT (_PROT_SECT_DEFAULT | PMD_MAYBE_NG)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#define __NR_compat_gettimeofday 78
#define __NR_compat_sigreturn 119
#define __NR_compat_rt_sigreturn 173
#define __NR_compat_clock_getres 247
#define __NR_compat_clock_gettime 263
#define __NR_compat_clock_getres 264
#define __NR_compat_clock_gettime64 403
#define __NR_compat_clock_getres_time64 406

Expand Down
25 changes: 20 additions & 5 deletions arch/arm64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,22 @@ void tick_broadcast(const struct cpumask *mask)
}
#endif

/*
* The number of CPUs online, not counting this CPU (which may not be
* fully online and so not counted in num_online_cpus()).
*/
static inline unsigned int num_other_online_cpus(void)
{
unsigned int this_cpu_online = cpu_online(smp_processor_id());

return num_online_cpus() - this_cpu_online;
}

void smp_send_stop(void)
{
unsigned long timeout;

if (num_online_cpus() > 1) {
if (num_other_online_cpus()) {
cpumask_t mask;

cpumask_copy(&mask, cpu_online_mask);
Expand All @@ -975,10 +986,10 @@ void smp_send_stop(void)

/* Wait up to one second for other CPUs to stop */
timeout = USEC_PER_SEC;
while (num_online_cpus() > 1 && timeout--)
while (num_other_online_cpus() && timeout--)
udelay(1);

if (num_online_cpus() > 1)
if (num_other_online_cpus())
pr_warn("SMP: failed to stop secondary CPUs %*pbl\n",
cpumask_pr_args(cpu_online_mask));

Expand All @@ -1001,15 +1012,19 @@ void crash_smp_send_stop(void)

cpus_stopped = 1;

if (num_online_cpus() == 1) {
/*
* If this cpu is the only one alive at this point in time, online or
* not, there are no stop messages to be sent around, so just back out.
*/
if (num_other_online_cpus() == 0) {
sdei_mask_local_cpu();
return;
}

cpumask_copy(&mask, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &mask);

atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
atomic_set(&waiting_for_crash_ipi, num_other_online_cpus());

pr_crit("SMP: stopping secondary CPUs\n");
smp_cross_call(&mask, IPI_CPU_CRASH_STOP);
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1817,6 +1817,7 @@ static void kvmppc_core_vcpu_free_pr(struct kvm_vcpu *vcpu)
{
struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);

kvmppc_mmu_destroy_pr(vcpu);
free_page((unsigned long)vcpu->arch.shared & PAGE_MASK);
#ifdef CONFIG_KVM_BOOK3S_32_HANDLER
kfree(vcpu->arch.shadow_vcpu);
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,6 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
return 0;

out_vcpu_uninit:
kvmppc_mmu_destroy(vcpu);
kvmppc_subarch_vcpu_uninit(vcpu);
return err;
}
Expand Down Expand Up @@ -792,7 +791,6 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)

kvmppc_core_vcpu_free(vcpu);

kvmppc_mmu_destroy(vcpu);
kvmppc_subarch_vcpu_uninit(vcpu);
}

Expand Down
9 changes: 2 additions & 7 deletions arch/powerpc/mm/kasan/kasan_init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ static void __init kasan_unmap_early_shadow_vmalloc(void)
unsigned long k_cur;
phys_addr_t pa = __pa(kasan_early_shadow_page);

if (!early_mmu_has_feature(MMU_FTR_HPTE_TABLE)) {
int ret = kasan_init_shadow_page_tables(k_start, k_end);

if (ret)
panic("kasan: kasan_init_shadow_page_tables() failed");
}
for (k_cur = k_start & PAGE_MASK; k_cur < k_end; k_cur += PAGE_SIZE) {
pmd_t *pmd = pmd_offset(pud_offset(pgd_offset_k(k_cur), k_cur), k_cur);
pte_t *ptep = pte_offset_kernel(pmd, k_cur);
Expand All @@ -143,7 +137,8 @@ void __init kasan_mmu_init(void)
int ret;
struct memblock_region *reg;

if (early_mmu_has_feature(MMU_FTR_HPTE_TABLE)) {
if (early_mmu_has_feature(MMU_FTR_HPTE_TABLE) ||
IS_ENABLED(CONFIG_KASAN_VMALLOC)) {
ret = kasan_init_shadow_page_tables(KASAN_SHADOW_START, KASAN_SHADOW_END);

if (ret)
Expand Down
Loading

0 comments on commit b7fd10d

Please sign in to comment.