Skip to content

Commit 909b27f

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
The nf_conntrack_core.c fix in 'net' is not relevant in 'net-next' because we no longer have a per-netns conntrack hash. The ip_gre.c conflict as well as the iwlwifi ones were cases of overlapping changes. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/tx.c net/ipv4/ip_gre.c net/netfilter/nf_conntrack_core.c Signed-off-by: David S. Miller <[email protected]>
2 parents 8fbb89c + 272911b commit 909b27f

File tree

144 files changed

+1364
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1364
-615
lines changed
Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,29 @@
1-
Device-Tree binding for regmap
2-
3-
The endianness mode of CPU & Device scenarios:
4-
Index Device Endianness properties
5-
---------------------------------------------------
6-
1 BE 'big-endian'
7-
2 LE 'little-endian'
8-
3 Native 'native-endian'
9-
10-
For one device driver, which will run in different scenarios above
11-
on different SoCs using the devicetree, we need one way to simplify
12-
this.
1+
Devicetree binding for regmap
132

143
Optional properties:
15-
- {big,little,native}-endian: these are boolean properties, if absent
16-
then the implementation will choose a default based on the device
17-
being controlled. These properties are for register values and all
18-
the buffers only. Native endian means that the CPU and device have
19-
the same endianness.
204

21-
Examples:
22-
Scenario 1 : CPU in LE mode & device in LE mode.
23-
dev: dev@40031000 {
24-
compatible = "name";
25-
reg = <0x40031000 0x1000>;
26-
...
27-
};
5+
little-endian,
6+
big-endian,
7+
native-endian: See common-properties.txt for a definition
288

29-
Scenario 2 : CPU in LE mode & device in BE mode.
30-
dev: dev@40031000 {
31-
compatible = "name";
32-
reg = <0x40031000 0x1000>;
33-
...
34-
big-endian;
35-
};
9+
Note:
10+
Regmap defaults to little-endian register access on MMIO based
11+
devices, this is by far the most common setting. On CPU
12+
architectures that typically run big-endian operating systems
13+
(e.g. PowerPC), registers can be defined as big-endian and must
14+
be marked that way in the devicetree.
3615

37-
Scenario 3 : CPU in BE mode & device in BE mode.
38-
dev: dev@40031000 {
39-
compatible = "name";
40-
reg = <0x40031000 0x1000>;
41-
...
42-
};
16+
On SoCs that can be operated in both big-endian and little-endian
17+
modes, with a single hardware switch controlling both the endianess
18+
of the CPU and a byteswap for MMIO registers (e.g. many Broadcom MIPS
19+
chips), "native-endian" is used to allow using the same device tree
20+
blob in both cases.
4321

44-
Scenario 4 : CPU in BE mode & device in LE mode.
22+
Examples:
23+
Scenario 1 : a register set in big-endian mode.
4524
dev: dev@40031000 {
46-
compatible = "name";
25+
compatible = "syscon";
4726
reg = <0x40031000 0x1000>;
27+
big-endian;
4828
...
49-
little-endian;
5029
};

Documentation/sysctl/kernel.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ allowed to execute.
645645
perf_event_paranoid:
646646

647647
Controls use of the performance events system by unprivileged
648-
users (without CAP_SYS_ADMIN). The default value is 1.
648+
users (without CAP_SYS_ADMIN). The default value is 2.
649649

650650
-1: Allow use of (almost) all events by all users
651651
>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK

MAINTAINERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11315,6 +11315,20 @@ F: include/trace/
1131511315
F: kernel/trace/
1131611316
F: tools/testing/selftests/ftrace/
1131711317

11318+
TRACING MMIO ACCESSES (MMIOTRACE)
11319+
M: Steven Rostedt <[email protected]>
11320+
M: Ingo Molnar <[email protected]>
11321+
R: Karol Herbst <[email protected]>
11322+
R: Pekka Paalanen <[email protected]>
11323+
S: Maintained
11324+
11325+
11326+
F: kernel/trace/trace_mmiotrace.c
11327+
F: include/linux/mmiotrace.h
11328+
F: arch/x86/mm/kmmio.c
11329+
F: arch/x86/mm/mmio-mod.c
11330+
F: arch/x86/mm/testmmiotrace.c
11331+
1131811332
TRIVIAL PATCHES
1131911333
M: Jiri Kosina <[email protected]>
1132011334
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git

arch/arm/boot/dts/at91sam9x5.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
pmc: pmc@fffffc00 {
108108
compatible = "atmel,at91sam9x5-pmc", "syscon";
109-
reg = <0xfffffc00 0x100>;
109+
reg = <0xfffffc00 0x200>;
110110
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
111111
interrupt-controller;
112112
#address-cells = <1>;

arch/arm/boot/dts/sama5d2.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
status = "disabled";
281281

282282
nfc@c0000000 {
283-
compatible = "atmel,sama5d4-nfc";
283+
compatible = "atmel,sama5d3-nfc";
284284
#address-cells = <1>;
285285
#size-cells = <1>;
286286
reg = < /* NFC Command Registers */

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ menu "Platform selection"
22

33
config ARCH_SUNXI
44
bool "Allwinner sunxi 64-bit SoC Family"
5+
select GENERIC_IRQ_CHIP
56
help
67
This enables support for Allwinner sunxi based SoCs like the A64.
78

arch/arm64/net/bpf_jit_comp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
476476
case BPF_JGE:
477477
jmp_cond = A64_COND_CS;
478478
break;
479+
case BPF_JSET:
479480
case BPF_JNE:
480481
jmp_cond = A64_COND_NE;
481482
break;

arch/x86/configs/kvm_guest.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ CONFIG_VIRTIO_NET=y
2626
CONFIG_9P_FS=y
2727
CONFIG_NET_9P=y
2828
CONFIG_NET_9P_VIRTIO=y
29+
CONFIG_SCSI_LOWLEVEL=y
30+
CONFIG_SCSI_VIRTIO=y
31+
CONFIG_VIRTIO_INPUT=y

arch/x86/events/intel/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3708,7 +3708,7 @@ __init int intel_pmu_init(void)
37083708
c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
37093709
}
37103710
c->idxmsk64 &=
3711-
~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
3711+
~(~0ULL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
37123712
c->weight = hweight64(c->idxmsk64);
37133713
}
37143714
}

arch/x86/events/intel/pt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ static int pt_buffer_reset_markers(struct pt_buffer *buf,
709709

710710
/* clear STOP and INT from current entry */
711711
buf->topa_index[buf->stop_pos]->stop = 0;
712+
buf->topa_index[buf->stop_pos]->intr = 0;
712713
buf->topa_index[buf->intr_pos]->intr = 0;
713714

714715
/* how many pages till the STOP marker */
@@ -733,6 +734,7 @@ static int pt_buffer_reset_markers(struct pt_buffer *buf,
733734
buf->intr_pos = idx;
734735

735736
buf->topa_index[buf->stop_pos]->stop = 1;
737+
buf->topa_index[buf->stop_pos]->intr = 1;
736738
buf->topa_index[buf->intr_pos]->intr = 1;
737739

738740
return 0;

arch/x86/events/intel/uncore_snbep.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@
219219
#define KNL_CHA_MSR_PMON_BOX_FILTER_TID 0x1ff
220220
#define KNL_CHA_MSR_PMON_BOX_FILTER_STATE (7 << 18)
221221
#define KNL_CHA_MSR_PMON_BOX_FILTER_OP (0xfffffe2aULL << 32)
222+
#define KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE (0x1ULL << 32)
223+
#define KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE (0x1ULL << 33)
224+
#define KNL_CHA_MSR_PMON_BOX_FILTER_NNC (0x1ULL << 37)
222225

223226
/* KNL EDC/MC UCLK */
224227
#define KNL_UCLK_MSR_PMON_CTR0_LOW 0x400
@@ -1902,6 +1905,10 @@ static int knl_cha_hw_config(struct intel_uncore_box *box,
19021905
reg1->reg = HSWEP_C0_MSR_PMON_BOX_FILTER0 +
19031906
KNL_CHA_MSR_OFFSET * box->pmu->pmu_idx;
19041907
reg1->config = event->attr.config1 & knl_cha_filter_mask(idx);
1908+
1909+
reg1->config |= KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE;
1910+
reg1->config |= KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE;
1911+
reg1->config |= KNL_CHA_MSR_PMON_BOX_FILTER_NNC;
19051912
reg1->idx = idx;
19061913
}
19071914
return 0;

arch/x86/events/msr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static void msr_event_update(struct perf_event *event)
166166
if (unlikely(event->hw.event_base == MSR_SMI_COUNT))
167167
delta = sign_extend64(delta, 31);
168168

169-
local64_add(now - prev, &event->count);
169+
local64_add(delta, &event->count);
170170
}
171171

172172
static void msr_event_start(struct perf_event *event, int flags)

arch/x86/include/asm/uaccess.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ struct exception_table_entry {
108108

109109
#define ARCH_HAS_RELATIVE_EXTABLE
110110

111+
#define swap_ex_entry_fixup(a, b, tmp, delta) \
112+
do { \
113+
(a)->fixup = (b)->fixup + (delta); \
114+
(b)->fixup = (tmp).fixup - (delta); \
115+
(a)->handler = (b)->handler + (delta); \
116+
(b)->handler = (tmp).handler - (delta); \
117+
} while (0)
118+
111119
extern int fixup_exception(struct pt_regs *regs, int trapnr);
112120
extern bool ex_has_fault_handler(unsigned long ip);
113121
extern int early_fixup_exception(unsigned long *ip);

arch/x86/kernel/cpu/intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int intel_num_cpu_cores(struct cpuinfo_x86 *c)
336336
{
337337
unsigned int eax, ebx, ecx, edx;
338338

339-
if (c->cpuid_level < 4)
339+
if (!IS_ENABLED(CONFIG_SMP) || c->cpuid_level < 4)
340340
return 1;
341341

342342
/* Intel has a non-standard dependency on %ecx for this CPUID level. */

arch/x86/kernel/smpboot.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ static void __init smp_init_package_map(void)
332332
* primary cores.
333333
*/
334334
ncpus = boot_cpu_data.x86_max_cores;
335+
if (!ncpus) {
336+
pr_warn("x86_max_cores == zero !?!?");
337+
ncpus = 1;
338+
}
339+
335340
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);
336341

337342
/*

arch/x86/kvm/emulate.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5110,13 +5110,17 @@ static void fetch_possible_mmx_operand(struct x86_emulate_ctxt *ctxt,
51105110

51115111
static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *))
51125112
{
5113+
register void *__sp asm(_ASM_SP);
51135114
ulong flags = (ctxt->eflags & EFLAGS_MASK) | X86_EFLAGS_IF;
5115+
51145116
if (!(ctxt->d & ByteOp))
51155117
fop += __ffs(ctxt->dst.bytes) * FASTOP_SIZE;
5118+
51165119
asm("push %[flags]; popf; call *%[fastop]; pushf; pop %[flags]\n"
51175120
: "+a"(ctxt->dst.val), "+d"(ctxt->src.val), [flags]"+D"(flags),
5118-
[fastop]"+S"(fop)
5121+
[fastop]"+S"(fop), "+r"(__sp)
51195122
: "c"(ctxt->src2.val));
5123+
51205124
ctxt->eflags = (ctxt->eflags & ~EFLAGS_MASK) | (flags & EFLAGS_MASK);
51215125
if (!fop) /* exception is returned in fop variable */
51225126
return emulate_de(ctxt);

block/blk-map.c

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,6 @@
99

1010
#include "blk.h"
1111

12-
static bool iovec_gap_to_prv(struct request_queue *q,
13-
struct iovec *prv, struct iovec *cur)
14-
{
15-
unsigned long prev_end;
16-
17-
if (!queue_virt_boundary(q))
18-
return false;
19-
20-
if (prv->iov_base == NULL && prv->iov_len == 0)
21-
/* prv is not set - don't check */
22-
return false;
23-
24-
prev_end = (unsigned long)(prv->iov_base + prv->iov_len);
25-
26-
return (((unsigned long)cur->iov_base & queue_virt_boundary(q)) ||
27-
prev_end & queue_virt_boundary(q));
28-
}
29-
3012
int blk_rq_append_bio(struct request_queue *q, struct request *rq,
3113
struct bio *bio)
3214
{
@@ -125,31 +107,18 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
125107
struct rq_map_data *map_data,
126108
const struct iov_iter *iter, gfp_t gfp_mask)
127109
{
128-
struct iovec iov, prv = {.iov_base = NULL, .iov_len = 0};
129-
bool copy = (q->dma_pad_mask & iter->count) || map_data;
110+
bool copy = false;
111+
unsigned long align = q->dma_pad_mask | queue_dma_alignment(q);
130112
struct bio *bio = NULL;
131113
struct iov_iter i;
132114
int ret;
133115

134-
if (!iter || !iter->count)
135-
return -EINVAL;
136-
137-
iov_for_each(iov, i, *iter) {
138-
unsigned long uaddr = (unsigned long) iov.iov_base;
139-
140-
if (!iov.iov_len)
141-
return -EINVAL;
142-
143-
/*
144-
* Keep going so we check length of all segments
145-
*/
146-
if ((uaddr & queue_dma_alignment(q)) ||
147-
iovec_gap_to_prv(q, &prv, &iov))
148-
copy = true;
149-
150-
prv.iov_base = iov.iov_base;
151-
prv.iov_len = iov.iov_len;
152-
}
116+
if (map_data)
117+
copy = true;
118+
else if (iov_iter_alignment(iter) & align)
119+
copy = true;
120+
else if (queue_virt_boundary(q))
121+
copy = queue_virt_boundary(q) & iov_iter_gap_alignment(iter);
153122

154123
i = *iter;
155124
do {

crypto/testmgr.c

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,7 @@ static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver,
17761776
static int do_test_rsa(struct crypto_akcipher *tfm,
17771777
struct akcipher_testvec *vecs)
17781778
{
1779+
char *xbuf[XBUFSIZE];
17791780
struct akcipher_request *req;
17801781
void *outbuf_enc = NULL;
17811782
void *outbuf_dec = NULL;
@@ -1784,9 +1785,12 @@ static int do_test_rsa(struct crypto_akcipher *tfm,
17841785
int err = -ENOMEM;
17851786
struct scatterlist src, dst, src_tab[2];
17861787

1788+
if (testmgr_alloc_buf(xbuf))
1789+
return err;
1790+
17871791
req = akcipher_request_alloc(tfm, GFP_KERNEL);
17881792
if (!req)
1789-
return err;
1793+
goto free_xbuf;
17901794

17911795
init_completion(&result.completion);
17921796

@@ -1804,9 +1808,14 @@ static int do_test_rsa(struct crypto_akcipher *tfm,
18041808
if (!outbuf_enc)
18051809
goto free_req;
18061810

1811+
if (WARN_ON(vecs->m_size > PAGE_SIZE))
1812+
goto free_all;
1813+
1814+
memcpy(xbuf[0], vecs->m, vecs->m_size);
1815+
18071816
sg_init_table(src_tab, 2);
1808-
sg_set_buf(&src_tab[0], vecs->m, 8);
1809-
sg_set_buf(&src_tab[1], vecs->m + 8, vecs->m_size - 8);
1817+
sg_set_buf(&src_tab[0], xbuf[0], 8);
1818+
sg_set_buf(&src_tab[1], xbuf[0] + 8, vecs->m_size - 8);
18101819
sg_init_one(&dst, outbuf_enc, out_len_max);
18111820
akcipher_request_set_crypt(req, src_tab, &dst, vecs->m_size,
18121821
out_len_max);
@@ -1825,7 +1834,7 @@ static int do_test_rsa(struct crypto_akcipher *tfm,
18251834
goto free_all;
18261835
}
18271836
/* verify that encrypted message is equal to expected */
1828-
if (memcmp(vecs->c, sg_virt(req->dst), vecs->c_size)) {
1837+
if (memcmp(vecs->c, outbuf_enc, vecs->c_size)) {
18291838
pr_err("alg: rsa: encrypt test failed. Invalid output\n");
18301839
err = -EINVAL;
18311840
goto free_all;
@@ -1840,7 +1849,13 @@ static int do_test_rsa(struct crypto_akcipher *tfm,
18401849
err = -ENOMEM;
18411850
goto free_all;
18421851
}
1843-
sg_init_one(&src, vecs->c, vecs->c_size);
1852+
1853+
if (WARN_ON(vecs->c_size > PAGE_SIZE))
1854+
goto free_all;
1855+
1856+
memcpy(xbuf[0], vecs->c, vecs->c_size);
1857+
1858+
sg_init_one(&src, xbuf[0], vecs->c_size);
18441859
sg_init_one(&dst, outbuf_dec, out_len_max);
18451860
init_completion(&result.completion);
18461861
akcipher_request_set_crypt(req, &src, &dst, vecs->c_size, out_len_max);
@@ -1867,6 +1882,8 @@ static int do_test_rsa(struct crypto_akcipher *tfm,
18671882
kfree(outbuf_enc);
18681883
free_req:
18691884
akcipher_request_free(req);
1885+
free_xbuf:
1886+
testmgr_free_buf(xbuf);
18701887
return err;
18711888
}
18721889

drivers/base/regmap/internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef _REGMAP_INTERNAL_H
1414
#define _REGMAP_INTERNAL_H
1515

16+
#include <linux/device.h>
1617
#include <linux/regmap.h>
1718
#include <linux/fs.h>
1819
#include <linux/list.h>

0 commit comments

Comments
 (0)