Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge tag 'v4.11' into capsicum
Browse files Browse the repository at this point in the history
Linux 4.11

Conflicts:
	Makefile
  • Loading branch information
daviddrysdale committed Sep 21, 2017
2 parents c819823 + a351e9b commit de1a408
Show file tree
Hide file tree
Showing 190 changed files with 1,861 additions and 769 deletions.
10 changes: 8 additions & 2 deletions Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ Hip05 Example (note that Hip06 is the same except compatible):
};

HiSilicon Hip06/Hip07 PCIe host bridge DT (almost-ECAM) description.

Some BIOSes place the host controller in a mode where it is ECAM
compliant for all devices other than the root complex. In such cases,
the host controller should be described as below.

The properties and their meanings are identical to those described in
host-generic-pci.txt except as listed below.

Properties of the host controller node that differ from
host-generic-pci.txt:

- compatible : Must be "hisilicon,pcie-almost-ecam"
- compatible : Must be "hisilicon,hip06-pcie-ecam", or
"hisilicon,hip07-pcie-ecam"

- reg : Two entries: First the ECAM configuration space for any
other bus underneath the root bus. Second, the base
Expand All @@ -59,7 +65,7 @@ host-generic-pci.txt:

Example:
pcie0: pcie@a0090000 {
compatible = "hisilicon,pcie-almost-ecam";
compatible = "hisilicon,hip06-pcie-ecam";
reg = <0 0xb0000000 0 0x2000000>, /* ECAM configuration space */
<0 0xa0090000 0 0x10000>; /* host bridge registers */
bus-range = <0 31>;
Expand Down
18 changes: 16 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2585,12 +2585,26 @@ F: include/uapi/linux/if_bonding.h

BPF (Safe dynamic programs and tools)
M: Alexei Starovoitov <ast@kernel.org>
M: Daniel Borkmann <daniel@iogearbox.net>
L: netdev@vger.kernel.org
L: linux-kernel@vger.kernel.org
S: Supported
F: arch/x86/net/bpf_jit*
F: Documentation/networking/filter.txt
F: include/linux/bpf*
F: include/linux/filter.h
F: include/uapi/linux/bpf*
F: include/uapi/linux/filter.h
F: kernel/bpf/
F: tools/testing/selftests/bpf/
F: kernel/trace/bpf_trace.c
F: lib/test_bpf.c
F: net/bpf/
F: net/core/filter.c
F: net/sched/act_bpf.c
F: net/sched/cls_bpf.c
F: samples/bpf/
F: tools/net/bpf*
F: tools/testing/selftests/bpf/

BROADCOM B44 10/100 ETHERNET DRIVER
M: Michael Chan <michael.chan@broadcom.com>
Expand Down Expand Up @@ -8769,6 +8783,7 @@ W: http://www.linuxfoundation.org/en/Net
Q: http://patchwork.ozlabs.org/project/netdev/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
B: mailto:netdev@vger.kernel.org
S: Maintained
F: net/
F: include/net/
Expand Down Expand Up @@ -12472,7 +12487,6 @@ F: drivers/clk/ti/
F: include/linux/clk/ti.h

TI ETHERNET SWITCH DRIVER (CPSW)
M: Mugunthan V N <mugunthanvnm@ti.com>
R: Grygorii Strashko <grygorii.strashko@ti.com>
L: linux-omap@vger.kernel.org
L: netdev@vger.kernel.org
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 4
PATCHLEVEL = 11
SUBLEVEL = 0
EXTRAVERSION = -rc7-capsicum
EXTRAVERSION = -capsicum
NAME = Fearless Coyote

# *DOCUMENTATION*
Expand Down
8 changes: 8 additions & 0 deletions arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,14 @@ config ARC_HAS_DIV_REM
bool "Insn: div, divu, rem, remu"
default y

config ARC_HAS_ACCL_REGS
bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
default n
help
Depending on the configuration, CPU can contain accumulator reg-pair
(also referred to as r58:r59). These can also be used by gcc as GPR so
kernel needs to save/restore per process

endif # ISA_ARCV2

endmenu # "ARC CPU Configuration"
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
#include <asm/barrier.h>
#include <asm/smp.h>

#define ATOMIC_INIT(i) { (i) }

#ifndef CONFIG_ARC_PLAT_EZNPS

#define atomic_read(v) READ_ONCE((v)->counter)
#define ATOMIC_INIT(i) { (i) }

#ifdef CONFIG_ARC_HAS_LLSC

Expand Down
10 changes: 10 additions & 0 deletions arch/arc/include/asm/entry-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
;
; Now manually save: r12, sp, fp, gp, r25

#ifdef CONFIG_ARC_HAS_ACCL_REGS
PUSH r59
PUSH r58
#endif

PUSH r30
PUSH r12

Expand Down Expand Up @@ -75,6 +80,11 @@
POP r12
POP r30

#ifdef CONFIG_ARC_HAS_ACCL_REGS
POP r58
POP r59
#endif

.endm

/*------------------------------------------------------------------------*/
Expand Down
4 changes: 4 additions & 0 deletions arch/arc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ struct pt_regs {

unsigned long r12, r30;

#ifdef CONFIG_ARC_HAS_ACCL_REGS
unsigned long r58, r59; /* ACCL/ACCH used by FPU / DSP MPY */
#endif

/*------- Below list auto saved by h/w -----------*/
unsigned long r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11;

Expand Down
30 changes: 21 additions & 9 deletions arch/arc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
static void arc_chk_core_config(void)
{
struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
int fpu_enabled;
int saved = 0, present = 0;
char *opt_nm = NULL;;

if (!cpu->extn.timer0)
panic("Timer0 is not present!\n");
Expand All @@ -346,17 +347,28 @@ static void arc_chk_core_config(void)

/*
* FP hardware/software config sanity
* -If hardware contains DPFP, kernel needs to save/restore FPU state
* -If hardware present, kernel needs to save/restore FPU state
* -If not, it will crash trying to save/restore the non-existant regs
*
* (only DPDP checked since SP has no arch visible regs)
*/
fpu_enabled = IS_ENABLED(CONFIG_ARC_FPU_SAVE_RESTORE);

if (cpu->extn.fpu_dp && !fpu_enabled)
pr_warn("CONFIG_ARC_FPU_SAVE_RESTORE needed for working apps\n");
else if (!cpu->extn.fpu_dp && fpu_enabled)
panic("FPU non-existent, disable CONFIG_ARC_FPU_SAVE_RESTORE\n");
if (is_isa_arcompact()) {
opt_nm = "CONFIG_ARC_FPU_SAVE_RESTORE";
saved = IS_ENABLED(CONFIG_ARC_FPU_SAVE_RESTORE);

/* only DPDP checked since SP has no arch visible regs */
present = cpu->extn.fpu_dp;
} else {
opt_nm = "CONFIG_ARC_HAS_ACCL_REGS";
saved = IS_ENABLED(CONFIG_ARC_HAS_ACCL_REGS);

/* Accumulator Low:High pair (r58:59) present if DSP MPY or FPU */
present = cpu->extn_mpy.dsp | cpu->extn.fpu_sp | cpu->extn.fpu_dp;
}

if (present && !saved)
pr_warn("Enable %s for working apps\n", opt_nm);
else if (!present && saved)
panic("Disable %s, hardware NOT present\n", opt_nm);
}

/*
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ $(generic_defconfigs):
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
-m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/generic_defconfig $^ \
$(foreach board,$(BOARDS),$(generic_config_dir)/board-$(board).config)
$(Q)$(MAKE) olddefconfig
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig

#
# Prevent generic merge_config rules attempting to merge single fragments
Expand All @@ -503,8 +503,8 @@ $(generic_config_dir)/%.config: ;
#
.PHONY: sead3_defconfig
sead3_defconfig:
$(Q)$(MAKE) 32r2el_defconfig BOARDS=sead-3
$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3

.PHONY: sead3micro_defconfig
sead3micro_defconfig:
$(Q)$(MAKE) micro32r2el_defconfig BOARDS=sead-3
$(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3
1 change: 1 addition & 0 deletions arch/mips/include/asm/asm-prototypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#include <asm/fpu.h>
#include <asm-generic/asm-prototypes.h>
#include <asm/uaccess.h>
#include <asm/ftrace.h>
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static unsigned int calculate_min_delta(void)
}

/* Sorted insert of 75th percentile into buf2 */
for (k = 0; k < i; ++k) {
for (k = 0; k < i && k < ARRAY_SIZE(buf2); ++k) {
if (buf1[ARRAY_SIZE(buf1) - 1] < buf2[k]) {
l = min_t(unsigned int,
i, ARRAY_SIZE(buf2) - 1);
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ int arch_check_elf(void *_ehdr, bool has_interpreter, void *_interp_ehdr,
else if ((prog_req.fr1 && prog_req.frdefault) ||
(prog_req.single && !prog_req.frdefault))
/* Make sure 64-bit MIPS III/IV/64R1 will not pick FR1 */
state->overall_fp_mode = ((current_cpu_data.fpu_id & MIPS_FPIR_F64) &&
state->overall_fp_mode = ((raw_current_cpu_data.fpu_id & MIPS_FPIR_F64) &&
cpu_has_mips_r2_r6) ?
FP_FR1 : FP_FR0;
else if (prog_req.fr1)
Expand Down
48 changes: 33 additions & 15 deletions arch/mips/kernel/kgdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,35 +244,53 @@ static int compute_signal(int tt)
void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
{
int reg;
struct thread_info *ti = task_thread_info(p);
unsigned long ksp = (unsigned long)ti + THREAD_SIZE - 32;
struct pt_regs *regs = (struct pt_regs *)ksp - 1;
#if (KGDB_GDB_REG_SIZE == 32)
u32 *ptr = (u32 *)gdb_regs;
#else
u64 *ptr = (u64 *)gdb_regs;
#endif

for (reg = 0; reg < 16; reg++)
*(ptr++) = regs->regs[reg];
*(ptr++) = 0;

/* S0 - S7 */
for (reg = 16; reg < 24; reg++)
*(ptr++) = regs->regs[reg];
*(ptr++) = p->thread.reg16;
*(ptr++) = p->thread.reg17;
*(ptr++) = p->thread.reg18;
*(ptr++) = p->thread.reg19;
*(ptr++) = p->thread.reg20;
*(ptr++) = p->thread.reg21;
*(ptr++) = p->thread.reg22;
*(ptr++) = p->thread.reg23;

for (reg = 24; reg < 28; reg++)
*(ptr++) = 0;

/* GP, SP, FP, RA */
for (reg = 28; reg < 32; reg++)
*(ptr++) = regs->regs[reg];

*(ptr++) = regs->cp0_status;
*(ptr++) = regs->lo;
*(ptr++) = regs->hi;
*(ptr++) = regs->cp0_badvaddr;
*(ptr++) = regs->cp0_cause;
*(ptr++) = regs->cp0_epc;
*(ptr++) = (long)p;
*(ptr++) = p->thread.reg29;
*(ptr++) = p->thread.reg30;
*(ptr++) = p->thread.reg31;

*(ptr++) = p->thread.cp0_status;

/* lo, hi */
*(ptr++) = 0;
*(ptr++) = 0;

/*
* BadVAddr, Cause
* Ideally these would come from the last exception frame up the stack
* but that requires unwinding, otherwise we can't know much for sure.
*/
*(ptr++) = 0;
*(ptr++) = 0;

/*
* PC
* use return address (RA), i.e. the moment after return from resume()
*/
*(ptr++) = p->thread.reg31;
}

void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
Expand Down
9 changes: 5 additions & 4 deletions arch/mips/kernel/perf_event_mipsxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,11 @@ static int mipsxx_pmu_handle_shared_irq(void)
HANDLE_COUNTER(0)
}

#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
read_unlock(&pmuint_rwlock);
#endif
resume_local_counters();

/*
* Do all the work for the pending perf events. We can do this
* in here because the performance counter interrupt is a regular
Expand All @@ -1454,10 +1459,6 @@ static int mipsxx_pmu_handle_shared_irq(void)
if (handled == IRQ_HANDLED)
irq_work_run();

#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
read_unlock(&pmuint_rwlock);
#endif
resume_local_counters();
return handled;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/relocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/kernel.h>
#include <linux/libfdt.h>
#include <linux/of_fdt.h>
#include <linux/sched.h>
#include <linux/sched/task.h>
#include <linux/start_kernel.h>
#include <linux/string.h>
#include <linux/printk.h>
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/kernel/smp-cps.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,12 @@ void play_dead(void)
local_irq_disable();
idle_task_exit();
cpu = smp_processor_id();
core = cpu_data[cpu].core;
cpu_death = CPU_DEATH_POWER;

pr_debug("CPU%d going offline\n", cpu);

if (cpu_has_mipsmt || cpu_has_vp) {
core = cpu_data[cpu].core;

/* Look for another online VPE within the core */
for_each_online_cpu(cpu_death_sibling) {
if (cpu_data[cpu_death_sibling].core != core)
Expand Down
11 changes: 11 additions & 0 deletions arch/mips/mti-malta/malta-int.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,17 @@ void __init arch_init_irq(void)
{
int corehi_irq;

/*
* Preallocate the i8259's expected virq's here. Since irqchip_init()
* will probe the irqchips in hierarchial order, i8259 is probed last.
* If anything allocates a virq before the i8259 is probed, it will
* be given one of the i8259's expected range and consequently setup
* of the i8259 will fail.
*/
WARN(irq_alloc_descs(I8259A_IRQ_BASE, I8259A_IRQ_BASE,
16, numa_node_id()) < 0,
"Cannot reserve i8259 virqs at IRQ%d\n", I8259A_IRQ_BASE);

i8259_set_poll(mips_pcibios_iack);
irqchip_init();

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/pci/pci-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void register_pci_controller(struct pci_controller *hose)
}

INIT_LIST_HEAD(&hose->list);
list_add(&hose->list, &controllers);
list_add_tail(&hose->list, &controllers);

/*
* Do not panic here but later - this might happen before console init.
Expand Down
Loading

0 comments on commit de1a408

Please sign in to comment.