Refreshed all patches.
Altered patches:
- 902-debloat_proc.patch
- 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch
Remove upstreamed:
- 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch
New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO
SGL_ALLOC
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
LINUX_RELEASE?=1
LINUX_VERSION-4.9 = .202
-LINUX_VERSION-4.14 = .152
+LINUX_VERSION-4.14 = .154
LINUX_KERNEL_HASH-4.9.202 = 8108ec1cd10fc40821c84e9f087dba10b1767aad66596f4a36925faef55e4ebf
-LINUX_KERNEL_HASH-4.14.152 = a9239fd9d341aae07b48a8e7a2afd528fe5cde2617d783454c71e6f3dae2b0aa
+LINUX_KERNEL_HASH-4.14.154 = 86de4a24379a78d67fc08b2e249ccf7b689eb6c37fbe329fc3dfbe8ab4300603
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -897,8 +897,6 @@ struct nft_stats {
+@@ -898,8 +898,6 @@ struct nft_stats {
struct u64_stats_sync syncp;
};
/**
* struct nft_base_chain - nf_tables base chain
*
-@@ -910,7 +908,7 @@ struct nft_stats {
+@@ -911,7 +909,7 @@ struct nft_stats {
* @dev_name: device name that this base chain is attached to (if any)
*/
struct nft_base_chain {
const struct nf_chain_type *type;
u8 policy;
u8 flags;
-@@ -971,8 +969,6 @@ enum nft_af_flags {
+@@ -972,8 +970,6 @@ enum nft_af_flags {
* @owner: module owner
* @tables: used internally
* @flags: family flags
* @hooks: hookfn overrides for packet validation
*/
struct nft_af_info {
-@@ -982,9 +978,6 @@ struct nft_af_info {
+@@ -983,9 +979,6 @@ struct nft_af_info {
struct module *owner;
struct list_head tables;
u32 flags;
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -875,7 +875,7 @@ enum nft_chain_type {
+@@ -876,7 +876,7 @@ enum nft_chain_type {
* @family: address family
* @owner: module owner
* @hook_mask: mask of valid hooks
*/
struct nf_chain_type {
const char *name;
-@@ -969,7 +969,6 @@ enum nft_af_flags {
+@@ -970,7 +970,6 @@ enum nft_af_flags {
* @owner: module owner
* @tables: used internally
* @flags: family flags
*/
struct nft_af_info {
struct list_head list;
-@@ -978,7 +977,6 @@ struct nft_af_info {
+@@ -979,7 +978,6 @@ struct nft_af_info {
struct module *owner;
struct list_head tables;
u32 flags;
#include <net/netlink.h>
#define NFT_JUMP_STACK_SIZE 16
-@@ -938,6 +939,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -939,6 +940,7 @@ unsigned int nft_do_chain(struct nft_pkt
* @chains: chains in the table
* @sets: sets in the table
* @objects: stateful objects in the table
* @hgenerator: handle generator state
* @use: number of chain references to this table
* @flags: table flag (see enum nft_table_flags)
-@@ -949,6 +951,7 @@ struct nft_table {
+@@ -950,6 +952,7 @@ struct nft_table {
struct list_head chains;
struct list_head sets;
struct list_head objects;
u64 hgenerator;
u32 use;
u16 flags:14,
-@@ -1080,6 +1083,44 @@ int nft_register_obj(struct nft_object_t
+@@ -1081,6 +1084,44 @@ int nft_register_obj(struct nft_object_t
void nft_unregister_obj(struct nft_object_type *obj_type);
/**
* struct nft_traceinfo - nft tracing information and state
*
* @pkt: pktinfo currently processed
-@@ -1315,4 +1356,11 @@ struct nft_trans_obj {
+@@ -1316,4 +1357,11 @@ struct nft_trans_obj {
#define nft_trans_obj(trans) \
(((struct nft_trans_obj *)trans->data)->obj)
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -968,7 +968,6 @@ enum nft_af_flags {
+@@ -969,7 +969,6 @@ enum nft_af_flags {
*
* @list: used internally
* @family: address family
* @owner: module owner
* @tables: used internally
* @flags: family flags
-@@ -976,7 +975,6 @@ enum nft_af_flags {
+@@ -977,7 +976,6 @@ enum nft_af_flags {
struct nft_af_info {
struct list_head list;
int family;
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -959,10 +959,6 @@ struct nft_table {
+@@ -960,10 +960,6 @@ struct nft_table {
char *name;
};
/**
* struct nft_af_info - nf_tables address family info
*
-@@ -970,14 +966,12 @@ enum nft_af_flags {
+@@ -971,14 +967,12 @@ enum nft_af_flags {
* @family: address family
* @owner: module owner
* @tables: used internally
bool report;
};
-@@ -944,6 +944,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -945,6 +945,7 @@ unsigned int nft_do_chain(struct nft_pkt
* @use: number of chain references to this table
* @flags: table flag (see enum nft_table_flags)
* @genmask: generation mask
* @name: name of the table
*/
struct nft_table {
-@@ -956,6 +957,7 @@ struct nft_table {
+@@ -957,6 +958,7 @@ struct nft_table {
u32 use;
u16 flags:14,
genmask:2;
char *name;
};
-@@ -965,13 +967,11 @@ struct nft_table {
+@@ -966,13 +968,11 @@ struct nft_table {
* @list: used internally
* @family: address family
* @owner: module owner
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -974,8 +974,8 @@ struct nft_af_info {
+@@ -975,8 +975,8 @@ struct nft_af_info {
struct module *owner;
};
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -955,28 +955,12 @@ struct nft_table {
+@@ -956,28 +956,12 @@ struct nft_table {
struct list_head flowtables;
u64 hgenerator;
u32 use;
int nft_register_chain_type(const struct nf_chain_type *);
void nft_unregister_chain_type(const struct nf_chain_type *);
-@@ -1144,9 +1128,6 @@ void nft_trace_notify(struct nft_tracein
+@@ -1145,9 +1129,6 @@ void nft_trace_notify(struct nft_tracein
#define nft_dereference(p) \
nfnl_dereference(p, NFNL_SUBSYS_NFTABLES)
u32 ktype;
u32 dtype;
u32 objtype;
-@@ -941,6 +943,7 @@ unsigned int nft_do_chain(struct nft_pkt
+@@ -942,6 +944,7 @@ unsigned int nft_do_chain(struct nft_pkt
* @objects: stateful objects in the table
* @flowtables: flow tables in the table
* @hgenerator: handle generator state
* @use: number of chain references to this table
* @flags: table flag (see enum nft_table_flags)
* @genmask: generation mask
-@@ -954,6 +957,7 @@ struct nft_table {
+@@ -955,6 +958,7 @@ struct nft_table {
struct list_head objects;
struct list_head flowtables;
u64 hgenerator;
u32 use;
u16 family:6,
flags:8,
-@@ -978,9 +982,9 @@ int nft_verdict_dump(struct sk_buff *skb
+@@ -979,9 +983,9 @@ int nft_verdict_dump(struct sk_buff *skb
* @name: name of this stateful object
* @genmask: generation mask
* @use: number of references to this stateful object
*/
struct nft_object {
struct list_head list;
-@@ -988,6 +992,7 @@ struct nft_object {
+@@ -989,6 +993,7 @@ struct nft_object {
struct nft_table *table;
u32 genmask:2,
use:30;
/* runtime data below here */
const struct nft_object_ops *ops ____cacheline_aligned;
unsigned char data[]
-@@ -1069,6 +1074,7 @@ void nft_unregister_obj(struct nft_objec
+@@ -1070,6 +1075,7 @@ void nft_unregister_obj(struct nft_objec
* @ops_len: number of hooks in array
* @genmask: generation mask
* @use: number of references to this flow table
* @data: rhashtable and garbage collector
* @ops: array of hooks
*/
-@@ -1081,6 +1087,7 @@ struct nft_flowtable {
+@@ -1082,6 +1088,7 @@ struct nft_flowtable {
int ops_len;
u32 genmask:2,
use:30;
struct delayed_work gc_work;
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
-@@ -1096,9 +1096,6 @@ struct nft_flowtable {
+@@ -1097,9 +1097,6 @@ struct nft_flowtable {
struct nft_flowtable *nf_tables_flowtable_lookup(const struct nft_table *table,
const struct nlattr *nla,
u8 genmask);
# CONFIG_SGI_IP28 is not set
# CONFIG_SGI_IP32 is not set
# CONFIG_SGI_PARTITION is not set
+# CONFIG_SGL_ALLOC is not set
# CONFIG_SG_POOL is not set
# CONFIG_SG_SPLIT is not set
CONFIG_SHMEM=y
--- a/Makefile
+++ b/Makefile
-@@ -1243,7 +1243,6 @@ all: modules
+@@ -1252,7 +1252,6 @@ all: modules
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1272,7 +1271,6 @@ _modinst_:
+@@ -1281,7 +1280,6 @@ _modinst_:
rm -f $(MODLIB)/build ; \
ln -s $(CURDIR) $(MODLIB)/build ; \
fi
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2514,6 +2514,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -2530,6 +2530,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
-@@ -2645,16 +2649,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -2661,16 +2665,6 @@ static inline struct sk_buff *dev_alloc_
}
#endif
#ifdef CONFIG_PROC_FS
- proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations);
-- proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations);
+- proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_operations);
+ if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) {
+ proc_create("buddyinfo", 0444, NULL, &buddyinfo_file_operations);
-+ proc_create("pagetypeinfo", 0444, NULL, &pagetypeinfo_file_operations);
++ proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_operations);
+ proc_create("zoneinfo", 0444, NULL, &zoneinfo_file_operations);
+ }
proc_create("vmstat", 0444, NULL, &vmstat_file_operations);
+MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -2164,6 +2164,7 @@ int wake_up_state(struct task_struct *p,
+@@ -2165,6 +2165,7 @@ int wake_up_state(struct task_struct *p,
{
return try_to_wake_up(p, state, 0);
}
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -2478,7 +2478,7 @@ static inline int pskb_network_may_pull(
+@@ -2494,7 +2494,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
async_desc->num_desc = num_alloc;
async_desc->curr_desc = async_desc->desc;
-@@ -685,14 +688,16 @@ err_out:
+@@ -685,29 +688,16 @@ err_out:
static int bam_dma_terminate_all(struct dma_chan *chan)
{
struct bam_chan *bchan = to_bam_chan(chan);
/* remove all transactions, including active transaction */
spin_lock_irqsave(&bchan->vc.lock, flag);
+- /*
+- * If we have transactions queued, then some might be committed to the
+- * hardware in the desc fifo. The only way to reset the desc fifo is
+- * to do a hardware reset (either by pipe or the entire block).
+- * bam_chan_init_hw() will trigger a pipe reset, and also reinit the
+- * pipe. If the pipe is left disabled (default state after pipe reset)
+- * and is accessed by a connected hardware engine, a fatal error in
+- * the BAM will occur. There is a small window where this could happen
+- * with bam_chan_init_hw(), but it is assumed that the caller has
+- * stopped activity on any attached hardware engine. Make sure to do
+- * this first so that the BAM hardware doesn't cause memory corruption
+- * by accessing freed resources.
+- */
- if (bchan->curr_txd) {
+- bam_chan_init_hw(bchan, bchan->curr_txd->dir);
- list_add(&bchan->curr_txd->vd.node, &bchan->vc.desc_issued);
- bchan->curr_txd = NULL;
+- }
+ list_for_each_entry_safe(async_desc, tmp,
-+ &bchan->desc_list, desc_node) {
++ &bchan->desc_list, desc_node) {
+ list_add(&async_desc->vd.node, &bchan->vc.desc_issued);
+ list_del(&async_desc->desc_node);
- }
vchan_get_all_descriptors(&bchan->vc, &head);
-@@ -764,9 +769,9 @@ static int bam_resume(struct dma_chan *c
+ spin_unlock_irqrestore(&bchan->vc.lock, flag);
+@@ -778,9 +768,9 @@ static int bam_resume(struct dma_chan *c
*/
static u32 process_channel_irqs(struct bam_device *bdev)
{
srcs = readl_relaxed(bam_addr(bdev, 0, BAM_IRQ_SRCS_EE));
-@@ -786,27 +791,40 @@ static u32 process_channel_irqs(struct b
+@@ -800,27 +790,40 @@ static u32 process_channel_irqs(struct b
writel_relaxed(pipe_stts, bam_addr(bdev, i, BAM_P_IRQ_CLR));
spin_lock_irqsave(&bchan->vc.lock, flags);
}
spin_unlock_irqrestore(&bchan->vc.lock, flags);
-@@ -868,6 +886,7 @@ static enum dma_status bam_tx_status(str
+@@ -882,6 +885,7 @@ static enum dma_status bam_tx_status(str
struct dma_tx_state *txstate)
{
struct bam_chan *bchan = to_bam_chan(chan);
struct virt_dma_desc *vd;
int ret;
size_t residue = 0;
-@@ -883,11 +902,17 @@ static enum dma_status bam_tx_status(str
+@@ -897,11 +901,17 @@ static enum dma_status bam_tx_status(str
spin_lock_irqsave(&bchan->vc.lock, flags);
vd = vchan_find_desc(&bchan->vc, cookie);
spin_unlock_irqrestore(&bchan->vc.lock, flags);
-@@ -928,63 +953,86 @@ static void bam_start_dma(struct bam_cha
+@@ -942,63 +952,86 @@ static void bam_start_dma(struct bam_cha
{
struct virt_dma_desc *vd = vchan_next_desc(&bchan->vc);
struct bam_device *bdev = bchan->bdev;
+ async_desc->xfer_len = avail;
+ else
+ async_desc->xfer_len = async_desc->num_desc;
-+
+
+- if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) {
+- u32 partial = MAX_DESCRIPTORS - bchan->tail;
+ /* set any special flags on the last descriptor */
+ if (async_desc->num_desc == async_desc->xfer_len)
+ desc[async_desc->xfer_len - 1].flags |=
+ cpu_to_le16(async_desc->flags);
-- if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) {
-- u32 partial = MAX_DESCRIPTORS - bchan->tail;
-+ vd = vchan_next_desc(&bchan->vc);
-
- memcpy(&fifo[bchan->tail], desc,
- partial * sizeof(struct bam_desc_hw));
- memcpy(fifo, &desc[partial], (async_desc->xfer_len - partial) *
++ vd = vchan_next_desc(&bchan->vc);
++
+ dmaengine_desc_get_callback(&async_desc->vd.tx, &cb);
+
+ /*
/* ensure descriptor writes and dma start not reordered */
wmb();
-@@ -1013,7 +1061,7 @@ static void dma_tasklet(unsigned long da
+@@ -1027,7 +1060,7 @@ static void dma_tasklet(unsigned long da
bchan = &bdev->channels[i];
spin_lock_irqsave(&bchan->vc.lock, flags);
bam_start_dma(bchan);
spin_unlock_irqrestore(&bchan->vc.lock, flags);
}
-@@ -1034,7 +1082,7 @@ static void bam_issue_pending(struct dma
+@@ -1048,7 +1081,7 @@ static void bam_issue_pending(struct dma
spin_lock_irqsave(&bchan->vc.lock, flags);
/* if work pending and idle, start a transaction */
bam_start_dma(bchan);
spin_unlock_irqrestore(&bchan->vc.lock, flags);
-@@ -1138,6 +1186,7 @@ static void bam_channel_init(struct bam_
+@@ -1152,6 +1185,7 @@ static void bam_channel_init(struct bam_
vchan_init(&bchan->vc, &bdev->common);
bchan->vc.desc_free = bam_dma_free_desc;
+ { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SECT_4K) },
{ "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
{ "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
- { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
#include <linux/slab.h>
#include <linux/rtnetlink.h>
#include <linux/sched/signal.h>
-@@ -2212,6 +2213,9 @@ static int __ethtool_get_module_info(str
+@@ -2214,6 +2215,9 @@ static int __ethtool_get_module_info(str
const struct ethtool_ops *ops = dev->ethtool_ops;
struct phy_device *phydev = dev->phydev;
if (phydev && phydev->drv && phydev->drv->module_info)
return phydev->drv->module_info(phydev, modinfo);
-@@ -2246,6 +2250,9 @@ static int __ethtool_get_module_eeprom(s
+@@ -2248,6 +2252,9 @@ static int __ethtool_get_module_eeprom(s
const struct ethtool_ops *ops = dev->ethtool_ops;
struct phy_device *phydev = dev->phydev;
+++ /dev/null
---- a/drivers/mtd/spi-nor/spi-nor.c
-+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -1098,7 +1098,7 @@ static const struct flash_info spi_nor_i
- { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
- { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
- { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
-- { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
-+ { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
- { "mx66u51235f", INFO(0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
- { "mx66l1g45g", INFO(0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
- { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) },
CONFIG_X86_FEATURE_NAMES=y
CONFIG_X86_GENERIC=y
# CONFIG_X86_GX_SUSPMOD is not set
+# CONFIG_X86_INTEL_MPX is not set
+# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set
# CONFIG_X86_INTEL_PSTATE is not set
+CONFIG_X86_INTEL_TSX_MODE_OFF=y
+# CONFIG_X86_INTEL_TSX_MODE_ON is not set
+# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_IO_APIC=y