mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
kernel: bump 3.18.136, 4.9.160, 4.14.103, 4.19.25
This commit is contained in:
parent
ee5d923e9e
commit
3da298931b
@ -2,15 +2,15 @@
|
||||
|
||||
LINUX_RELEASE?=1
|
||||
|
||||
LINUX_VERSION-3.18 = .134
|
||||
LINUX_VERSION-4.9 = .155
|
||||
LINUX_VERSION-4.14 = .98
|
||||
LINUX_VERSION-4.19 = .20
|
||||
LINUX_VERSION-3.18 = .136
|
||||
LINUX_VERSION-4.9 = .160
|
||||
LINUX_VERSION-4.14 = .103
|
||||
LINUX_VERSION-4.19 = .25
|
||||
|
||||
LINUX_KERNEL_HASH-3.18.134 = 36bdd04cab3b6c824a4b7e32ae02503f437e0916d5a4ff04c90aa22da2749c2f
|
||||
LINUX_KERNEL_HASH-4.9.155 = a52ac60be33c0fe312d99361f8e30211599956e958ba415d93194c6c9d073c9d
|
||||
LINUX_KERNEL_HASH-4.14.98 = 8f021171b1b1efb41326e603116a45126fc030d06aaa9b0784ae612323010c5f
|
||||
LINUX_KERNEL_HASH-4.19.20 = dc7d2776dad4bf738e741ed05e7d1bea685855cfb7a62d1706f5f7aeabfa04a4
|
||||
LINUX_KERNEL_HASH-3.18.136 = 48c8775013d23229462134f911bbb14c7935096fcccfb19ce28ecd5f7154f35c
|
||||
LINUX_KERNEL_HASH-4.9.160 = c09af067af62d299f5e33c279968de58c88fb7c59bd05e8f3bb460f611f60515
|
||||
LINUX_KERNEL_HASH-4.14.103 = 7aa43e34e4c9e5965da29cef5ae196e06006f8c0d1d65fd755a2f197f0796a11
|
||||
LINUX_KERNEL_HASH-4.19.25 = 7ec71d90d6e96e6f741676d157ac06f30c75be4eaf1649143a3c8b7d4f919731
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
14
package/lean/luci-app-nft-qos/Makefile
Normal file
14
package/lean/luci-app-nft-qos/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Qos over Nftables
|
||||
LUCI_DEPENDS:=+nft-qos
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
55
package/lean/luci-app-nft-qos/luasrc/controller/nft-qos.lua
Normal file
55
package/lean/luci-app-nft-qos/luasrc/controller/nft-qos.lua
Normal file
@ -0,0 +1,55 @@
|
||||
-- Copyright 2018 Rosy Song <rosysong@rosinson.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.nft-qos", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/nft-qos") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "status", "realtime", "rate"},
|
||||
template("nft-qos/rate"), _("Rate"), 5).leaf = true
|
||||
entry({"admin", "status", "realtime", "rate_status"},
|
||||
call("action_rate")).leaf = true
|
||||
entry({"admin", "services", "nft-qos"}, cbi("nft-qos/nft-qos"),
|
||||
_("Qos over Nftables"), 60)
|
||||
end
|
||||
|
||||
function _action_rate(rv, n)
|
||||
local c = nixio.fs.access("/proc/net/ipv6_route") and
|
||||
io.popen("nft list chain inet nft-qos-monitor " .. n .. " 2>/dev/null") or
|
||||
io.popen("nft list chain ip nft-qos-monitor " .. n .. " 2>/dev/null")
|
||||
|
||||
if c then
|
||||
for l in c:lines() do
|
||||
local _, i, p, b = l:match(
|
||||
'^%s+ip ([^%s]+) ([^%s]+) counter packets (%d+) bytes (%d+)'
|
||||
)
|
||||
if i and p and b then
|
||||
-- handle expression
|
||||
rv[#rv + 1] = {
|
||||
rule = {
|
||||
family = "inet",
|
||||
table = "nft-qos-monitor",
|
||||
chain = n,
|
||||
handle = 0,
|
||||
expr = {
|
||||
{ match = { right = i } },
|
||||
{ counter = { packets = p, bytes = b } }
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
c:close()
|
||||
end
|
||||
end
|
||||
|
||||
function action_rate()
|
||||
luci.http.prepare_content("application/json")
|
||||
local data = { nftables = {} }
|
||||
_action_rate(data.nftables, "upload")
|
||||
_action_rate(data.nftables, "download")
|
||||
luci.http.write_json(data)
|
||||
end
|
@ -0,0 +1,229 @@
|
||||
-- Copyright 2018 Rosy Song <rosysong@rosinson.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
local uci = require("luci.model.uci").cursor()
|
||||
local wa = require("luci.tools.webadmin")
|
||||
local fs = require("nixio.fs")
|
||||
local ipc = require("luci.ip")
|
||||
|
||||
local def_rate_dl = uci:get("nft-qos", "default", "static_rate_dl")
|
||||
local def_rate_ul = uci:get("nft-qos", "default", "static_rate_ul")
|
||||
local def_unit_dl = uci:get("nft-qos", "default", "static_unit_dl")
|
||||
local def_unit_ul = uci:get("nft-qos", "default", "static_unit_ul")
|
||||
|
||||
local def_up = uci:get("nft-qos", "default", "dynamic_bw_up")
|
||||
local def_down = uci:get("nft-qos", "default", "dynamic_bw_down")
|
||||
|
||||
local limit_enable = uci:get("nft-qos", "default", "limit_enable")
|
||||
local limit_type = uci:get("nft-qos", "default", "limit_type")
|
||||
local enable_priority = uci:get("nft-qos", "default", "priority_enable")
|
||||
|
||||
local has_ipv6 = fs.access("/proc/net/ipv6_route")
|
||||
|
||||
m = Map("nft-qos", translate("Qos over Nftables"))
|
||||
|
||||
--
|
||||
-- Taboptions
|
||||
--
|
||||
s = m:section(TypedSection, "default", translate("NFT-QoS Settings"))
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
s:tab("limit", "Limit Rate")
|
||||
s:tab("priority", "Traffic Priority")
|
||||
|
||||
--
|
||||
-- Static
|
||||
--
|
||||
o = s:taboption("limit", Flag, "limit_enable", translate("Limit Enable"), translate("Enable Limit Rate Feature"))
|
||||
o.default = limit_enable or o.enabled
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("limit", ListValue, "limit_type", translate("Limit Type"), translate("Type of Limit Rate"))
|
||||
o.default = limit_static or "static"
|
||||
o:depends("limit_enable","1")
|
||||
o:value("static", "Static")
|
||||
o:value("dynamic", "Dynamic")
|
||||
|
||||
o = s:taboption("limit", Value, "static_rate_dl", translate("Default Download Rate"), translate("Default value for download rate"))
|
||||
o.datatype = "uinteger"
|
||||
o.default = def_rate_dl or '50'
|
||||
o:depends("limit_type","static")
|
||||
|
||||
o = s:taboption("limit", ListValue, "static_unit_dl", translate("Default Download Unit"), translate("Default unit for download rate"))
|
||||
o.default = def_unit_dl or "kbytes"
|
||||
o:depends("limit_type","static")
|
||||
o:value("bytes", "Bytes/s")
|
||||
o:value("kbytes", "KBytes/s")
|
||||
o:value("mbytes", "MBytes/s")
|
||||
|
||||
o = s:taboption("limit", Value, "static_rate_ul", translate("Default Upload Rate"), translate("Default value for upload rate"))
|
||||
o.datatype = "uinteger"
|
||||
o.default = def_rate_ul or '50'
|
||||
o:depends("limit_type","static")
|
||||
|
||||
o = s:taboption("limit", ListValue, "static_unit_ul", translate("Default Upload Unit"), translate("Default unit for upload rate"))
|
||||
o.default = def_unit_ul or "kbytes"
|
||||
o:depends("limit_type","static")
|
||||
o:value("bytes", "Bytes/s")
|
||||
o:value("kbytes", "KBytes/s")
|
||||
o:value("mbytes", "MBytes/s")
|
||||
|
||||
--
|
||||
-- Dynamic
|
||||
--
|
||||
o = s:taboption("limit", Value, "dynamic_bw_down", translate("Download Bandwidth (Mbps)"), translate("Default value for download bandwidth"))
|
||||
o.default = def_up or '100'
|
||||
o.datatype = "uinteger"
|
||||
o:depends("limit_type","dynamic")
|
||||
|
||||
o = s:taboption("limit", Value, "dynamic_bw_up", translate("Upload Bandwidth (Mbps)"), translate("Default value for upload bandwidth"))
|
||||
o.default = def_down or '100'
|
||||
o.datatype = "uinteger"
|
||||
o:depends("limit_type","dynamic")
|
||||
|
||||
o = s:taboption("limit", Value, "dynamic_cidr", translate("Target Network (IPv4/MASK)"), translate("Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc"))
|
||||
o.datatype = "cidr4"
|
||||
ipc.routes({ family = 4, type = 1 }, function(rt) o.default = rt.dest end)
|
||||
o:depends("limit_type","dynamic")
|
||||
|
||||
if has_ipv6 then
|
||||
o = s:taboption("limit", Value, "dynamic_cidr6", translate("Target Network6 (IPv6/MASK)"), translate("Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc"))
|
||||
o.datatype = "cidr6"
|
||||
o:depends("limit_type","dynamic")
|
||||
end
|
||||
|
||||
o = s:taboption("limit", DynamicList, "limit_whitelist", translate("White List for Limit Rate"))
|
||||
o.datatype = "ipaddr"
|
||||
o:depends("limit_enable","1")
|
||||
|
||||
--
|
||||
-- Priority
|
||||
--
|
||||
o = s:taboption("priority", Flag, "priority_enable", translate("Enable Traffic Priority"), translate("Enable this feature"))
|
||||
o.default = enable_priority or o.enabled
|
||||
o.rmempty = false
|
||||
|
||||
o = s:taboption("priority", ListValue, "priority_netdev", translate("Default Network Interface"), translate("Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc"))
|
||||
o:depends("priority_enable", "1")
|
||||
wa.cbi_add_networks(o)
|
||||
|
||||
--
|
||||
-- Static Limit Rate - Download Rate
|
||||
--
|
||||
if limit_enable == "1" and limit_type == "static" then
|
||||
|
||||
x = m:section(TypedSection, "download", translate("Static QoS-Download Rate"))
|
||||
x.anonymous = true
|
||||
x.addremove = true
|
||||
x.template = "cbi/tblsection"
|
||||
|
||||
o = x:option(Value, "hostname", translate("Hostname"))
|
||||
o.datatype = "hostname"
|
||||
o.default = 'undefined'
|
||||
|
||||
if has_ipv6 then
|
||||
o = x:option(Value, "ipaddr", translate("IP Address(V4 / V6)"))
|
||||
else
|
||||
o = x:option(Value, "ipaddr", translate("IP Address(V4 Only)"))
|
||||
end
|
||||
o.datatype = "ipaddr"
|
||||
if nixio.fs.access("/tmp/dhcp.leases") or nixio.fs.access("/var/dhcp6.leases") then
|
||||
o.titleref = luci.dispatcher.build_url("admin", "status", "overview")
|
||||
end
|
||||
|
||||
o = x:option(Value, "macaddr", translate("MAC (optional)"))
|
||||
o.rmempty = true
|
||||
o.datatype = "macaddr"
|
||||
|
||||
o = x:option(Value, "rate", translate("Rate"))
|
||||
o.default = def_rate_dl or '50'
|
||||
o.size = 4
|
||||
o.datatype = "uinteger"
|
||||
|
||||
o = x:option(ListValue, "unit", translate("Unit"))
|
||||
o.default = def_unit_dl or "kbytes"
|
||||
o:value("bytes", "Bytes/s")
|
||||
o:value("kbytes", "KBytes/s")
|
||||
o:value("mbytes", "MBytes/s")
|
||||
|
||||
--
|
||||
-- Static Limit Rate - Upload Rate
|
||||
--
|
||||
y = m:section(TypedSection, "upload", translate("Static QoS-Upload Rate"))
|
||||
y.anonymous = true
|
||||
y.addremove = true
|
||||
y.template = "cbi/tblsection"
|
||||
|
||||
o = y:option(Value, "hostname", translate("Hostname"))
|
||||
o.datatype = "hostname"
|
||||
o.default = 'undefined'
|
||||
|
||||
if has_ipv6 then
|
||||
o = y:option(Value, "ipaddr", translate("IP Address(V4 / V6)"))
|
||||
else
|
||||
o = y:option(Value, "ipaddr", translate("IP Address(V4 Only)"))
|
||||
end
|
||||
o.datatype = "ipaddr"
|
||||
if nixio.fs.access("/tmp/dhcp.leases") or nixio.fs.access("/var/dhcp6.leases") then
|
||||
o.titleref = luci.dispatcher.build_url("admin", "status", "overview")
|
||||
end
|
||||
|
||||
o = y:option(Value, "macaddr", translate("MAC (optional)"))
|
||||
o.rmempty = true
|
||||
o.datatype = "macaddr"
|
||||
|
||||
o = y:option(Value, "rate", translate("Rate"))
|
||||
o.default = def_rate_ul or '50'
|
||||
o.size = 4
|
||||
o.datatype = "uinteger"
|
||||
|
||||
o = y:option(ListValue, "unit", translate("Unit"))
|
||||
o.default = def_unit_ul or "kbytes"
|
||||
o:value("bytes", "Bytes/s")
|
||||
o:value("kbytes", "KBytes/s")
|
||||
o:value("mbytes", "MBytes/s")
|
||||
|
||||
end
|
||||
|
||||
--
|
||||
-- Traffic Priority Settings
|
||||
--
|
||||
if enable_priority == "1" then
|
||||
|
||||
s = m:section(TypedSection, "priority", translate("Traffic Priority Settings"))
|
||||
s.anonymous = true
|
||||
s.addremove = true
|
||||
s.template = "cbi/tblsection"
|
||||
|
||||
o = s:option(ListValue, "protocol", translate("Protocol"))
|
||||
o.default = "tcp"
|
||||
o:value("tcp", "TCP")
|
||||
o:value("udp", "UDP")
|
||||
o:value("udplite", "UDP-Lite")
|
||||
o:value("sctp", "SCTP")
|
||||
o:value("dccp", "DCCP")
|
||||
|
||||
o = s:option(ListValue, "priority", translate("Priority"))
|
||||
o.default = "1"
|
||||
o:value("-400", "1")
|
||||
o:value("-300", "2")
|
||||
o:value("-225", "3")
|
||||
o:value("-200", "4")
|
||||
o:value("-150", "5")
|
||||
o:value("-100", "6")
|
||||
o:value("0", "7")
|
||||
o:value("50", "8")
|
||||
o:value("100", "9")
|
||||
o:value("225", "10")
|
||||
o:value("300", "11")
|
||||
|
||||
o = s:option(Value, "service", translate("Service"), translate("e.g. https, 23, (separator is comma)"))
|
||||
o.default = '?'
|
||||
|
||||
o = s:option(Value, "comment", translate("Comment"))
|
||||
o.default = '?'
|
||||
|
||||
end
|
||||
|
||||
return m
|
167
package/lean/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm
Normal file
167
package/lean/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm
Normal file
@ -0,0 +1,167 @@
|
||||
<%#
|
||||
Copyright 2018 Rosy Song <rosysong@rosinson.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%+header%>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var bwxhr = new XHR();
|
||||
|
||||
var RC = { };
|
||||
var em = 0;
|
||||
var ec = 1;
|
||||
|
||||
var rate_table_dl;
|
||||
var rate_table_ul;
|
||||
|
||||
function init_bytes(rl, ra) {
|
||||
var bytes_pre;
|
||||
var obj = { };
|
||||
obj.chain = rl.chain;
|
||||
obj.ipaddr = rl.expr[em].match.right;
|
||||
obj.bytes = rl.expr[ec].counter.bytes;
|
||||
obj.packets = rl.expr[ec].counter.packets;
|
||||
obj.rate = 0;
|
||||
|
||||
if (RC[obj.chain] && RC[obj.chain][obj.ipaddr])
|
||||
bytes_pre = RC[obj.chain][obj.ipaddr];
|
||||
else
|
||||
bytes_pre = 0;
|
||||
|
||||
obj.rate = (bytes_pre > 0) ? (obj.bytes - bytes_pre) / 3: 0;
|
||||
|
||||
if (!RC[obj.chain])
|
||||
RC[obj.chain] = { };
|
||||
RC[obj.chain][obj.ipaddr] = obj.bytes;
|
||||
|
||||
if (!ra[obj.chain])
|
||||
ra[obj.chain] = [ ];
|
||||
ra[obj.chain].push(obj);
|
||||
} /* function init_bytes(rl, ra) */
|
||||
|
||||
function bytes_label(bytes) {
|
||||
var uby = '<%:kB%>';
|
||||
var kby = (bytes / 1024);
|
||||
|
||||
if (kby > 1024) {
|
||||
uby = '<%:MB%>';
|
||||
kby = (kby / 1024);
|
||||
}
|
||||
|
||||
return String.format("%f %s", kby.toFixed(2), uby);
|
||||
}
|
||||
|
||||
function print_table(tbl, rs, ra) {
|
||||
ra.sort(function(a, b) { return b.rate - a.rate });
|
||||
for (var i = 0; i < ra.length; i++) {
|
||||
rs.push([
|
||||
ra[i].ipaddr,
|
||||
bytes_label(ra[i].rate) + '/s',
|
||||
bytes_label(ra[i].bytes),
|
||||
'%s Pkts.'.format(ra[i].packets),
|
||||
]);
|
||||
}
|
||||
cbi_update_table(tbl, rs, '<em><%:No information available%></em>');
|
||||
} /* function print_table(tbl, ra) */
|
||||
|
||||
/* wait for SVG */
|
||||
window.setTimeout(
|
||||
function() {
|
||||
if (!RC)
|
||||
{
|
||||
window.setTimeout(arguments.callee, 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
rate_table_dl = document.getElementById('rate_table_dl');
|
||||
rate_table_ul = document.getElementById('rate_table_ul');
|
||||
|
||||
/* render datasets, start update interval */
|
||||
XHR.poll(3, '<%=build_url("admin/status/realtime/rate_status")%>', null,
|
||||
function(x, json)
|
||||
{
|
||||
var RA = {};
|
||||
var rows_dl = [];
|
||||
var rows_ul = [];
|
||||
|
||||
var rules = json.nftables;
|
||||
for (var i = 0; i < rules.length; i++)
|
||||
{
|
||||
if (!rules[i].rule)
|
||||
continue;
|
||||
if (rules[i].rule.table != 'nft-qos-monitor')
|
||||
continue;
|
||||
|
||||
var rl = rules[i].rule;
|
||||
switch (rl.chain)
|
||||
{
|
||||
case 'download':
|
||||
case 'upload': init_bytes(rl, RA); break;
|
||||
}
|
||||
} /* for (var i = 0; i < rules.length; i++) */
|
||||
|
||||
/* display the result */
|
||||
if (RA.download) {
|
||||
while (rate_table_dl.firstElementChild !== rate_table_dl.lastElementChild)
|
||||
rate_table_dl.removeChild(rate_table_dl.lastElementChild);
|
||||
print_table(rate_table_dl, rows_dl, RA.download);
|
||||
}
|
||||
if (RA.upload) {
|
||||
while (rate_table_ul.firstElementChild !== rate_table_ul.lastElementChild)
|
||||
rate_table_ul.removeChild(rate_table_ul.lastElementChild);
|
||||
print_table(rate_table_ul, rows_ul, RA.upload);
|
||||
}
|
||||
|
||||
} /* function(x, json) */
|
||||
); /* XHR.poll() */
|
||||
|
||||
XHR.run();
|
||||
}
|
||||
}, 1000
|
||||
);
|
||||
//]]></script>
|
||||
|
||||
<h2 name="content"><%:Realtime Rate%></h2>
|
||||
|
||||
<div class="cbi-map-descr"><%:This page gives an overview over currently download/upload rate.%></div>
|
||||
|
||||
<fieldset class="cbi-section" id="cbi-table-table">
|
||||
<legend><%:Realtime Download Rate%></legend>
|
||||
<div class="cbi-section-node">
|
||||
<div class="table" id="rate_table_dl">
|
||||
<div class="tr table-titles">
|
||||
<div class="th col-2 hide-xs"><%:IP Address%></div>
|
||||
<div class="th col-2"><%:Download Rate%></div>
|
||||
<div class="th col-7"><%:Bytes Total%></div>
|
||||
<div class="th col-7"><%:Packets Total%></div>
|
||||
</div>
|
||||
<div class="tr placeholder">
|
||||
<div class="td">
|
||||
<em><%:Collecting data...%></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="cbi-section" id="cbi-table-table">
|
||||
<legend><%:Realtime Upload Rate%></legend>
|
||||
<div class="cbi-section-node">
|
||||
<div class="table" id="rate_table_ul">
|
||||
<div class="tr table-titles">
|
||||
<div class="th col-2 hide-xs"><%:IP Address%></div>
|
||||
<div class="th col-2"><%:Upload Rate%></div>
|
||||
<div class="th col-7"><%:Bytes Total%></div>
|
||||
<div class="th col-7"><%:Packets Total%></div>
|
||||
</div>
|
||||
<div class="tr placeholder">
|
||||
<div class="td">
|
||||
<em><%:Collecting data...%></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<%+footer%>
|
230
package/lean/luci-app-nft-qos/po/templates/nft-qos.pot
Normal file
230
package/lean/luci-app-nft-qos/po/templates/nft-qos.pot
Normal file
@ -0,0 +1,230 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155
|
||||
msgid "Bytes Total"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:141
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:160
|
||||
msgid "Collecting data..."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:224
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default Download Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default Download Unit"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Default Network Interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default Upload Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default Upload Unit"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default unit for download rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default unit for upload rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Default value for download bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default value for download rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Default value for upload bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default value for upload rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Download Bandwidth (Mbps)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:135
|
||||
msgid "Download Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Enable Limit Rate Feature"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable Traffic Priority"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable this feature"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:121
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:158
|
||||
msgid "Hostname"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:134
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:153
|
||||
msgid "IP Address"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:126
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:163
|
||||
msgid "IP Address(V4 / V6)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:128
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:165
|
||||
msgid "IP Address(V4 Only)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Limit Enable"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Limit Type"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:135
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:172
|
||||
msgid "MAC (optional)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:48
|
||||
msgid "MB"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:28
|
||||
msgid "NFT-QoS Settings"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:65
|
||||
msgid "No information available"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:137
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:156
|
||||
msgid "Packets Total"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:207
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:199
|
||||
msgid "Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:16
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:23
|
||||
msgid "Qos over Nftables"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:12
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:139
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:176
|
||||
msgid "Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:130
|
||||
msgid "Realtime Download Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:125
|
||||
msgid "Realtime Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:149
|
||||
msgid "Realtime Upload Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "Service"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:116
|
||||
msgid "Static QoS-Download Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:153
|
||||
msgid "Static QoS-Upload Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Target Network (IPv4/MASK)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Target Network6 (IPv6/MASK)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:127
|
||||
msgid "This page gives an overview over currently download/upload rate."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:194
|
||||
msgid "Traffic Priority Settings"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Type of Limit Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:144
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:181
|
||||
msgid "Unit"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Upload Bandwidth (Mbps)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:154
|
||||
msgid "Upload Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:96
|
||||
msgid "White List for Limit Rate"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "e.g. https, 23, (separator is comma)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:44
|
||||
msgid "kB"
|
||||
msgstr ""
|
244
package/lean/luci-app-nft-qos/po/zh-cn/nft-qos.po
Normal file
244
package/lean/luci-app-nft-qos/po/zh-cn/nft-qos.po
Normal file
@ -0,0 +1,244 @@
|
||||
#
|
||||
# Yangfl <mmyangfl@gmail.com>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2019-01-03 22:28+0800\n"
|
||||
"Language-Team: <debian-l10n-chinese@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 3.30.1\n"
|
||||
"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: zh_CN\n"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155
|
||||
msgid "Bytes Total"
|
||||
msgstr "字节总数"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:141
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:160
|
||||
msgid "Collecting data..."
|
||||
msgstr "正在收集数据…"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:224
|
||||
msgid "Comment"
|
||||
msgstr "注释"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default Download Rate"
|
||||
msgstr "默认下载速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default Download Unit"
|
||||
msgstr "默认下载速率单位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Default Network Interface"
|
||||
msgstr "默认网络接口"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default Upload Rate"
|
||||
msgstr "默认上传速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default Upload Unit"
|
||||
msgstr "默认上传速率单位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default unit for download rate"
|
||||
msgstr "默认的下载速率单位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default unit for upload rate"
|
||||
msgstr "默认的上传速率单位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Default value for download bandwidth"
|
||||
msgstr "下载带宽的默认值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default value for download rate"
|
||||
msgstr "下载速率的默认值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Default value for upload bandwidth"
|
||||
msgstr "上传带宽的默认值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default value for upload rate"
|
||||
msgstr "上传速率的默认值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Download Bandwidth (Mbps)"
|
||||
msgstr "下载带宽(Mbps)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:135
|
||||
msgid "Download Rate"
|
||||
msgstr "下载速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Enable Limit Rate Feature"
|
||||
msgstr "开启速率限制功能"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable Traffic Priority"
|
||||
msgstr "开启流量优先级"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable this feature"
|
||||
msgstr "开启这个功能"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:121
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:158
|
||||
msgid "Hostname"
|
||||
msgstr "主机名"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:134
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:153
|
||||
msgid "IP Address"
|
||||
msgstr "IP 地址"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:126
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:163
|
||||
msgid "IP Address(V4 / V6)"
|
||||
msgstr "IP 地址(V4 / V6)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:128
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:165
|
||||
msgid "IP Address(V4 Only)"
|
||||
msgstr "IP 地址(仅 V4)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Limit Enable"
|
||||
msgstr "限速开启"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Limit Type"
|
||||
msgstr "限速类型"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:135
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:172
|
||||
msgid "MAC (optional)"
|
||||
msgstr "物理地址(可选)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:48
|
||||
msgid "MB"
|
||||
msgstr "MB"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:28
|
||||
msgid "NFT-QoS Settings"
|
||||
msgstr "NFT-QoS 设置"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc"
|
||||
msgstr "流量整形的目标网络接口,例如br-lan、eth0.1、eth0等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc"
|
||||
msgstr "将要应用规则的网络,例如192.168.1.0/24、10.2.0.0/16等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc"
|
||||
msgstr "将要应用规则的网络,例如AAAA::BBBB/64、CCCC::1/128等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:65
|
||||
msgid "No information available"
|
||||
msgstr "没有更多的信息"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:137
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:156
|
||||
msgid "Packets Total"
|
||||
msgstr "数据包总数"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:207
|
||||
msgid "Priority"
|
||||
msgstr "优先级"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:199
|
||||
msgid "Protocol"
|
||||
msgstr "协议"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:16
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:23
|
||||
msgid "Qos over Nftables"
|
||||
msgstr "QoS Nftables 版"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:12
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:139
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:176
|
||||
msgid "Rate"
|
||||
msgstr "速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:130
|
||||
msgid "Realtime Download Rate"
|
||||
msgstr "实时下载速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:125
|
||||
msgid "Realtime Rate"
|
||||
msgstr "实时速率显示"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:149
|
||||
msgid "Realtime Upload Rate"
|
||||
msgstr "实时上传速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "Service"
|
||||
msgstr "服务"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:116
|
||||
msgid "Static QoS-Download Rate"
|
||||
msgstr "静态 QoS-下载速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:153
|
||||
msgid "Static QoS-Upload Rate"
|
||||
msgstr "静态 QoS-上传速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Target Network (IPv4/MASK)"
|
||||
msgstr "目标网络(IPv4 地址/掩码)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Target Network6 (IPv6/MASK)"
|
||||
msgstr "目标网络 v6(IPv6 地址/掩码)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:127
|
||||
msgid "This page gives an overview over currently download/upload rate."
|
||||
msgstr "该页面提供了当前上传和下载速率的一个总览。"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:194
|
||||
msgid "Traffic Priority Settings"
|
||||
msgstr "流量优先级设置"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Type of Limit Rate"
|
||||
msgstr "限速的类型"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:144
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:181
|
||||
msgid "Unit"
|
||||
msgstr "单位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Upload Bandwidth (Mbps)"
|
||||
msgstr "上传带宽(Mbps)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:154
|
||||
msgid "Upload Rate"
|
||||
msgstr "上传速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:96
|
||||
msgid "White List for Limit Rate"
|
||||
msgstr "限速白名单"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "e.g. https, 23, (separator is comma)"
|
||||
msgstr "例如https, 23(用逗号分隔)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:44
|
||||
msgid "kB"
|
||||
msgstr "kB"
|
244
package/lean/luci-app-nft-qos/po/zh-tw/nft-qos.po
Normal file
244
package/lean/luci-app-nft-qos/po/zh-tw/nft-qos.po
Normal file
@ -0,0 +1,244 @@
|
||||
#
|
||||
# Yangfl <mmyangfl@gmail.com>, 2019.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2019-01-03 22:28+0800\n"
|
||||
"Language-Team: <debian-l10n-chinese@lists.debian.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Gtranslator 3.30.1\n"
|
||||
"Last-Translator: Yangfl <mmyangfl@gmail.com>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: zh_TW\n"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:136
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:155
|
||||
msgid "Bytes Total"
|
||||
msgstr "位元組總數"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:141
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:160
|
||||
msgid "Collecting data..."
|
||||
msgstr "正在收集資料…"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:224
|
||||
msgid "Comment"
|
||||
msgstr "註釋"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default Download Rate"
|
||||
msgstr "預設下載速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default Download Unit"
|
||||
msgstr "預設下載速率單位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Default Network Interface"
|
||||
msgstr "預設網路介面"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default Upload Rate"
|
||||
msgstr "預設上傳速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default Upload Unit"
|
||||
msgstr "預設上傳速率單位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:53
|
||||
msgid "Default unit for download rate"
|
||||
msgstr "預設的下載速率單位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:65
|
||||
msgid "Default unit for upload rate"
|
||||
msgstr "預設的上傳速率單位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Default value for download bandwidth"
|
||||
msgstr "下載頻寬的預設值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:48
|
||||
msgid "Default value for download rate"
|
||||
msgstr "下載速率的預設值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Default value for upload bandwidth"
|
||||
msgstr "上傳頻寬的預設值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:60
|
||||
msgid "Default value for upload rate"
|
||||
msgstr "上傳速率的預設值"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:75
|
||||
msgid "Download Bandwidth (Mbps)"
|
||||
msgstr "下載頻寬(Mbps)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:135
|
||||
msgid "Download Rate"
|
||||
msgstr "下載速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Enable Limit Rate Feature"
|
||||
msgstr "開啟速率限制功能"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable Traffic Priority"
|
||||
msgstr "開啟流量優先順序"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:103
|
||||
msgid "Enable this feature"
|
||||
msgstr "開啟這個功能"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:121
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:158
|
||||
msgid "Hostname"
|
||||
msgstr "主機名"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:134
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:153
|
||||
msgid "IP Address"
|
||||
msgstr "IP 位址"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:126
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:163
|
||||
msgid "IP Address(V4 / V6)"
|
||||
msgstr "IP 位址(V4 / V6)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:128
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:165
|
||||
msgid "IP Address(V4 Only)"
|
||||
msgstr "IP 位址(僅 V4)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:38
|
||||
msgid "Limit Enable"
|
||||
msgstr "限速開啟"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Limit Type"
|
||||
msgstr "限速型別"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:135
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:172
|
||||
msgid "MAC (optional)"
|
||||
msgstr "實體位址(可選)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:48
|
||||
msgid "MB"
|
||||
msgstr "MB"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:28
|
||||
msgid "NFT-QoS Settings"
|
||||
msgstr "NFT-QoS 設定"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:107
|
||||
msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc"
|
||||
msgstr "流量整形的目標網路介面,例如br-lan、eth0.1、eth0等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc"
|
||||
msgstr "將要應用規則的網路,例如192.168.1.0/24、10.2.0.0/16等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc"
|
||||
msgstr "將要應用規則的網路,例如AAAA::BBBB/64、CCCC::1/128等"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:65
|
||||
msgid "No information available"
|
||||
msgstr "沒有更多的資訊"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:137
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:156
|
||||
msgid "Packets Total"
|
||||
msgstr "資料包總數"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:207
|
||||
msgid "Priority"
|
||||
msgstr "優先順序"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:199
|
||||
msgid "Protocol"
|
||||
msgstr "協議"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:16
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:23
|
||||
msgid "Qos over Nftables"
|
||||
msgstr "QoS Nftables 版"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua:12
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:139
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:176
|
||||
msgid "Rate"
|
||||
msgstr "速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:130
|
||||
msgid "Realtime Download Rate"
|
||||
msgstr "實時下載速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:125
|
||||
msgid "Realtime Rate"
|
||||
msgstr "實時速率顯示"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:149
|
||||
msgid "Realtime Upload Rate"
|
||||
msgstr "實時上傳速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "Service"
|
||||
msgstr "服務"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:116
|
||||
msgid "Static QoS-Download Rate"
|
||||
msgstr "靜態 QoS-下載速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:153
|
||||
msgid "Static QoS-Upload Rate"
|
||||
msgstr "靜態 QoS-上傳速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:85
|
||||
msgid "Target Network (IPv4/MASK)"
|
||||
msgstr "目標網路(IPv4 位址/掩碼)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:91
|
||||
msgid "Target Network6 (IPv6/MASK)"
|
||||
msgstr "目標網路 v6(IPv6 位址/掩碼)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:127
|
||||
msgid "This page gives an overview over currently download/upload rate."
|
||||
msgstr "該頁面提供了當前上傳和下載速率的一個總覽。"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:194
|
||||
msgid "Traffic Priority Settings"
|
||||
msgstr "流量優先順序設定"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:42
|
||||
msgid "Type of Limit Rate"
|
||||
msgstr "限速的型別"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:144
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:181
|
||||
msgid "Unit"
|
||||
msgstr "單位"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:80
|
||||
msgid "Upload Bandwidth (Mbps)"
|
||||
msgstr "上傳頻寬(Mbps)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:154
|
||||
msgid "Upload Rate"
|
||||
msgstr "上傳速率"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:96
|
||||
msgid "White List for Limit Rate"
|
||||
msgstr "限速白名單"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua:221
|
||||
msgid "e.g. https, 23, (separator is comma)"
|
||||
msgstr "例如https, 23(用逗號分隔)"
|
||||
|
||||
#: applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm:44
|
||||
msgid "kB"
|
||||
msgstr "kB"
|
58
package/lean/nft-qos/Makefile
Normal file
58
package/lean/nft-qos/Makefile
Normal file
@ -0,0 +1,58 @@
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nft-qos
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_MAINTAINER:=Rosy Song <rosysong@rosinson.com>
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/nft-qos
|
||||
SECTION:=utils
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+nftables +kmod-nft-netdev +kmod-nft-bridge
|
||||
TITLE:=QoS scripts over nftables
|
||||
endef
|
||||
|
||||
define Package/nft-qos/description
|
||||
This package provides implementation for qos over nftables.
|
||||
Currently, static/dynamic qos and traffic shaping are supported.
|
||||
endef
|
||||
|
||||
define Package/nft-qos/conffiles
|
||||
/etc/config/nft-qos
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/nft-qos/install
|
||||
$(INSTALL_DIR) $(1)/lib/nft-qos
|
||||
$(INSTALL_DATA) ./files/lib/* $(1)/lib/nft-qos/
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/nft-qos.config $(1)/etc/config/nft-qos
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/nft-qos.init $(1)/etc/init.d/nft-qos
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/dhcp
|
||||
$(INSTALL_BIN) ./files/nft-qos-monitor.hotplug $(1)/etc/hotplug.d/dhcp/00-nft-qos-monitor
|
||||
$(INSTALL_BIN) ./files/nft-qos-dynamic.hotplug $(1)/etc/hotplug.d/dhcp/01-nft-qos-dynamic
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,nft-qos))
|
93
package/lean/nft-qos/files/lib/core.sh
Normal file
93
package/lean/nft-qos/files/lib/core.sh
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
# for uci_validate_section()
|
||||
. /lib/functions/procd.sh
|
||||
|
||||
NFT_QOS_HAS_BRIDGE=
|
||||
NFT_QOS_INET_FAMILY=ip
|
||||
NFT_QOS_SCRIPT_TEXT=
|
||||
NFT_QOS_SCRIPT_FILE=/tmp/qos.nft
|
||||
|
||||
qosdef_appendx() { # <string to be appended>
|
||||
NFT_QOS_SCRIPT_TEXT="$NFT_QOS_SCRIPT_TEXT""$1"
|
||||
}
|
||||
|
||||
qosdef_append_chain_def() { # <type> <hook> <priority> <policy>
|
||||
qosdef_appendx "\t\ttype $1 hook $2 priority $3; policy $4;\n"
|
||||
}
|
||||
|
||||
qosdef_append_chain_ingress() { # <type> <device> <priority> <policy>
|
||||
qosdef_appendx "\t\ttype $1 hook ingress device $2 priority $3; policy $4;\n"
|
||||
}
|
||||
|
||||
# qosdef_append_rule_{MATCH}_{STATEMENT}
|
||||
qosdef_append_rule_ip_limit() { # <ipaddr> <operator> <unit> <rate>
|
||||
local ipaddr=$1
|
||||
local operator=$2
|
||||
local unit=$3
|
||||
local rate=$4
|
||||
|
||||
qosdef_appendx \
|
||||
"\t\tip $operator $ipaddr limit rate over $rate $unit/second drop\n"
|
||||
}
|
||||
|
||||
# qosdef_append_rule_{MATCH}_{POLICY}
|
||||
qosdef_append_rule_ip_policy() { # <operator> <ipaddr> <policy>
|
||||
qosdef_appendx "\t\tip $1 $2 $3\n"
|
||||
}
|
||||
|
||||
_handle_limit_whitelist() { # <value> <chain>
|
||||
local ipaddr=$1
|
||||
local operator
|
||||
|
||||
[ -z "$ipaddr" ] && return
|
||||
|
||||
case "$2" in
|
||||
download) operator="daddr";;
|
||||
upload) operator="saddr";;
|
||||
esac
|
||||
|
||||
qosdef_append_rule_ip_policy $operator $ipaddr accept
|
||||
}
|
||||
|
||||
qosdef_append_rule_limit_whitelist() { # <chain>
|
||||
config_list_foreach default limit_whitelist _handle_limit_whitelist $1
|
||||
}
|
||||
|
||||
qosdef_flush_table() { # <family> <table>
|
||||
nft flush table $1 $2 2>/dev/null
|
||||
}
|
||||
|
||||
qosdef_remove_table() { # <family> <table>
|
||||
nft delete table $1 $2 2>/dev/null
|
||||
}
|
||||
|
||||
qosdef_init_header() { # add header for nft script
|
||||
qosdef_appendx "#!/usr/sbin/nft -f\n"
|
||||
qosdef_appendx "# Copyright (C) 2018 rosysong@rosinson.com\n"
|
||||
qosdef_appendx "#\n\n"
|
||||
}
|
||||
|
||||
qosdef_init_env() {
|
||||
# check interface type of lan
|
||||
local lt="$(uci_get "network.lan.type")"
|
||||
[ "$lt" = "bridge" ] && export NFT_QOS_HAS_BRIDGE="y"
|
||||
|
||||
# check if ipv6 support
|
||||
[ -e /proc/sys/net/ipv6 ] && export NFT_QOS_INET_FAMILY="inet"
|
||||
}
|
||||
|
||||
qosdef_clean_cache() {
|
||||
rm -f $NFT_QOS_SCRIPT_FILE
|
||||
}
|
||||
|
||||
qosdef_init_done() {
|
||||
echo -e $NFT_QOS_SCRIPT_TEXT > $NFT_QOS_SCRIPT_FILE 2>/dev/null
|
||||
}
|
||||
|
||||
qosdef_start() {
|
||||
nft -f $NFT_QOS_SCRIPT_FILE 2>/dev/null
|
||||
}
|
89
package/lean/nft-qos/files/lib/dynamic.sh
Normal file
89
package/lean/nft-qos/files/lib/dynamic.sh
Normal file
@ -0,0 +1,89 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
# return average rate for dhcp leases
|
||||
qosdef_dynamic_rate() { # <bandwidth>
|
||||
local c=0 c6=0
|
||||
|
||||
[ ! -e /tmp/dhcp.leases -a \
|
||||
! -e /var/dhcp6.leases ] && return
|
||||
|
||||
[ -e /tmp/dhcp.leases ] && \
|
||||
c=$(wc -l < /tmp/dhcp.leases 2>/dev/null)
|
||||
[ -e /var/dhcp6.leases ] && \
|
||||
c6=$(wc -l < /var/dhcp6.leases 2>/dev/null)
|
||||
[ $c -eq 0 -a $c6 -eq 0 ] && \
|
||||
{ echo 12500; return; }
|
||||
|
||||
echo $(($1 / ($c + $c6)))
|
||||
}
|
||||
|
||||
qosdef_append_chain_dym() { # <hook> <name> <bandwidth>
|
||||
local cidr cidr6
|
||||
local operator rate
|
||||
local hook=$1 name=$2 bandwidth=$3
|
||||
|
||||
config_get cidr default 'dynamic_cidr'
|
||||
config_get cidr6 default 'dynamic_cidr6'
|
||||
|
||||
[ -z "$cidr" -a -z "$cidr6" ] && return
|
||||
|
||||
case "$2" in
|
||||
download) operator=daddr;;
|
||||
upload) operator=saddr;;
|
||||
esac
|
||||
|
||||
rate=$(qosdef_dynamic_rate $bandwidth)
|
||||
|
||||
qosdef_appendx "\tchain $name {\n"
|
||||
qosdef_append_chain_def filter $hook 0 accept
|
||||
qosdef_append_rule_limit_whitelist $name
|
||||
[ -n "$cidr" ] && \
|
||||
qosdef_append_rule_ip_limit $cidr $operator kbytes $rate
|
||||
[ -n "$cidr6" ] && \
|
||||
qosdef_append_rule_ip_limit $cidr6 $operator kbytes $rate
|
||||
qosdef_appendx "\t}\n"
|
||||
}
|
||||
|
||||
qosdef_flush_dynamic() {
|
||||
qosdef_flush_table "$NFT_QOS_INET_FAMILY" nft-qos-dynamic
|
||||
}
|
||||
|
||||
# init dynamic qos
|
||||
qosdef_init_dynamic() {
|
||||
local dynamic_bw_up dynamic_bw_down limit_enable limit_type
|
||||
local hook_ul="prerouting" hook_dl="postrouting"
|
||||
|
||||
uci_validate_section nft-qos default default \
|
||||
'limit_enable:bool:0' \
|
||||
'limit_type:maxlength(8)' \
|
||||
'dynamic_bw_up:uinteger:100' \
|
||||
'dynamic_bw_down:uinteger:100'
|
||||
|
||||
[ $? -ne 0 ] && {
|
||||
logger -t nft-qos-dynamic "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ $limit_enable -eq 0 -o \
|
||||
"$limit_type" = "static" ] && return 1
|
||||
|
||||
# Transfer mbits/s to mbytes/s
|
||||
# e.g. 100,000 kbits == 12,500 kbytes
|
||||
dynamic_bw_up=$(($dynamic_bw_up * 1000 / 8))
|
||||
dynamic_bw_down=$(($dynamic_bw_down * 1000 / 8))
|
||||
|
||||
[ -z "$NFT_QOS_HAS_BRIDGE" ] && {
|
||||
hook_ul="postrouting"
|
||||
hook_dl="prerouting"
|
||||
}
|
||||
|
||||
qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-dynamic {\n"
|
||||
qosdef_append_chain_dym $hook_ul upload $dynamic_bw_up
|
||||
qosdef_append_chain_dym $hook_dl download $dynamic_bw_down
|
||||
qosdef_appendx "}\n"
|
||||
}
|
39
package/lean/nft-qos/files/lib/monitor.sh
Normal file
39
package/lean/nft-qos/files/lib/monitor.sh
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
qosdef_monitor_get_ip_handle() { # <family> <chain> <ip>
|
||||
echo $(nft list chain $1 nft-qos-monitor $2 -a 2>/dev/null | grep $3 | awk '{print $11}')
|
||||
}
|
||||
|
||||
qosdef_monitor_add() { # <mac> <ip> <hostname>
|
||||
handle_dl=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY download $2)
|
||||
[ -z "$handle_dl" ] && nft add rule $NFT_QOS_INET_FAMILY nft-qos-monitor download ip daddr $2 counter
|
||||
handle_ul=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY upload $2)
|
||||
[ -z "$handle_ul" ] && nft add rule $NFT_QOS_INET_FAMILY nft-qos-monitor upload ip saddr $2 counter
|
||||
}
|
||||
|
||||
qosdef_monitor_del() { # <mac> <ip> <hostname>
|
||||
local handle_dl handle_ul
|
||||
handle_dl=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY download $2)
|
||||
handle_ul=$(qosdef_monitor_get_ip_handle $NFT_QOS_INET_FAMILY upload $2)
|
||||
[ -n "$handle_dl" ] && nft delete handle $handle_dl
|
||||
[ -n "$handle_ul" ] && nft delete handle $handle_ul
|
||||
}
|
||||
|
||||
# init qos monitor
|
||||
qosdef_init_monitor() {
|
||||
local hook_ul="prerouting" hook_dl="postrouting"
|
||||
|
||||
[ -z "$NFT_QOS_HAS_BRIDGE" ] && {
|
||||
hook_ul="postrouting"
|
||||
hook_dl="prerouting"
|
||||
}
|
||||
|
||||
nft add table $NFT_QOS_INET_FAMILY nft-qos-monitor
|
||||
nft add chain $NFT_QOS_INET_FAMILY nft-qos-monitor upload { type filter hook $hook_ul priority 0\; }
|
||||
nft add chain $NFT_QOS_INET_FAMILY nft-qos-monitor download { type filter hook $hook_dl priority 0\; }
|
||||
}
|
90
package/lean/nft-qos/files/lib/priority.sh
Normal file
90
package/lean/nft-qos/files/lib/priority.sh
Normal file
@ -0,0 +1,90 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/functions/network.sh
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
P1=""; P2=""; P3=""; P4=""; P5=""; P6="";
|
||||
P7=""; P8=""; P9=""; P10=""; P11="";
|
||||
|
||||
_qosdef_handle_protox() { # <priority> <rule>
|
||||
case "$1" in
|
||||
-400) P1="$P1""$2";;
|
||||
-300) P2="$P2""$2";;
|
||||
-225) P3="$P3""$2";;
|
||||
-200) P4="$P4""$2";;
|
||||
-150) P5="$P5""$2";;
|
||||
-100) P6="$P6""$2";;
|
||||
0) P7="$P7""$2";;
|
||||
50) P8="$P8""$2";;
|
||||
100) P9="$P9""$2";;
|
||||
225) P10="$P10""$2";;
|
||||
300) P11="$P11""$2";;
|
||||
esac
|
||||
}
|
||||
|
||||
qosdef_handle_protox() { # <section>
|
||||
local proto prio srv
|
||||
|
||||
config_get proto $1 'protocol'
|
||||
config_get prio $1 'priority'
|
||||
config_get srv $1 'service'
|
||||
|
||||
[ -z "$proto" -o \
|
||||
-z "$prio" -o \
|
||||
-z "$srv" ] && return
|
||||
|
||||
_qosdef_handle_protox $prio \
|
||||
"\t\t$proto dport { $srv } accept\n"
|
||||
}
|
||||
|
||||
qosdef_append_rule_protox() { # <section>
|
||||
config_foreach qosdef_handle_protox $1
|
||||
qosdef_appendx \
|
||||
"${P1}${P2}${P3}${P4}${P5}${P6}${P7}${P8}${P9}${P10}${P11}"
|
||||
}
|
||||
|
||||
qosdef_append_chain_priority() { # <name> <section> <device>
|
||||
local name=$1 device=$3
|
||||
|
||||
qosdef_appendx "\tchain $name {\n"
|
||||
qosdef_append_chain_ingress filter $device 0 accept
|
||||
qosdef_append_rule_protox $2
|
||||
qosdef_appendx "\t}\n"
|
||||
}
|
||||
|
||||
qosdef_remove_priority() {
|
||||
qosdef_remove_table netdev nft-qos-priority
|
||||
}
|
||||
|
||||
# init traffic priority
|
||||
qosdef_init_priority() {
|
||||
local priority_enable priority_netdev ifname="br-lan"
|
||||
|
||||
uci_validate_section nft-qos default default \
|
||||
'priority_enable:bool:0' \
|
||||
'priority_netdev:maxlength(8)'
|
||||
|
||||
[ $? -ne 0 ] && {
|
||||
logger -t nft-qos-priority "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ $priority_enable -eq 0 ] && return 1
|
||||
|
||||
case "$priority_netdev" in
|
||||
lan) [ "$(uci_get network.lan.type)" != "bridge" ] && {
|
||||
network_get_device ifname "$priority_netdev" || \
|
||||
ifname="$(uci_get network.lan.ifname)"
|
||||
}
|
||||
;;
|
||||
wan*) network_get_device ifname "$priority_netdev" || \
|
||||
ifname="$(uci_get network.$priority_netdev.ifname)"
|
||||
esac
|
||||
|
||||
qosdef_appendx "table netdev nft-qos-priority {\n"
|
||||
qosdef_append_chain_priority filter priority $ifname
|
||||
qosdef_appendx "}\n"
|
||||
}
|
73
package/lean/nft-qos/files/lib/static.sh
Normal file
73
package/lean/nft-qos/files/lib/static.sh
Normal file
@ -0,0 +1,73 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
|
||||
# append rule for static qos
|
||||
qosdef_append_rule_sta() { # <section> <operator> <default-unit> <default-rate>
|
||||
local ipaddr unit rate
|
||||
local operator=$2
|
||||
|
||||
config_get ipaddr $1 ipaddr
|
||||
config_get unit $1 unit $3
|
||||
config_get rate $1 rate $4
|
||||
|
||||
[ -z "$ipaddr" ] && return
|
||||
|
||||
qosdef_append_rule_ip_limit $ipaddr $operator $unit $rate
|
||||
}
|
||||
|
||||
# append chain for static qos
|
||||
qosdef_append_chain_sta() { # <hook> <name> <section> <unit> <rate>
|
||||
local hook=$1 name=$2
|
||||
local config=$3 operator
|
||||
|
||||
case "$name" in
|
||||
download) operator="daddr";;
|
||||
upload) operator="saddr";;
|
||||
esac
|
||||
|
||||
qosdef_appendx "\tchain $name {\n"
|
||||
qosdef_append_chain_def filter $hook 0 accept
|
||||
qosdef_append_rule_limit_whitelist $name
|
||||
config_foreach qosdef_append_rule_sta $config $operator $4 $5
|
||||
qosdef_appendx "\t}\n"
|
||||
}
|
||||
|
||||
qosdef_flush_static() {
|
||||
qosdef_flush_table "$NFT_QOS_INET_FAMILY" nft-qos-static
|
||||
}
|
||||
|
||||
# static limit rate init
|
||||
qosdef_init_static() {
|
||||
local unit_dl unit_ul rate_dl rate_ul
|
||||
local limit_enable limit_type hook_ul="prerouting" hook_dl="postrouting"
|
||||
|
||||
uci_validate_section nft-qos default default \
|
||||
'limit_enable:bool:0' \
|
||||
'limit_type:maxlength(8)' \
|
||||
'static_unit_dl:string:kbytes' \
|
||||
'static_unit_ul:string:kbytes' \
|
||||
'static_rate_dl:uinteger:50' \
|
||||
'static_rate_ul:uinteger:50'
|
||||
|
||||
[ $? -ne 0 ] && {
|
||||
logger -t nft-qos-static "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ $limit_enable -eq 0 -o \
|
||||
$limit_type = "dynamic" ] && return 1
|
||||
|
||||
[ -z "$NFT_QOS_HAS_BRIDGE" ] && {
|
||||
hook_ul="postrouting"
|
||||
hook_dl="prerouting"
|
||||
}
|
||||
|
||||
qosdef_appendx "table $NFT_QOS_INET_FAMILY nft-qos-static {\n"
|
||||
qosdef_append_chain_sta $hook_ul upload upload $unit_ul $rate_ul
|
||||
qosdef_append_chain_sta $hook_dl download download $unit_dl $rate_dl
|
||||
qosdef_appendx "}\n"
|
||||
}
|
42
package/lean/nft-qos/files/nft-qos-dynamic.hotplug
Normal file
42
package/lean/nft-qos/files/nft-qos-dynamic.hotplug
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
export initscript="nft-qos-dynamic"
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/nft-qos/core.sh
|
||||
. /lib/nft-qos/dynamic.sh
|
||||
|
||||
NFT_QOS_DYNAMIC_ON=
|
||||
|
||||
qosdef_validate_section_dynamic() {
|
||||
local limit_enable limit_type
|
||||
|
||||
uci_validate_section nft-qos default default \
|
||||
'limit_enable:bool:0' \
|
||||
'limit_type:maxlength(8)'
|
||||
|
||||
[ $limit_enable -eq 1 -a \
|
||||
"$limit_type" = "dynamic" ] && \
|
||||
NFT_QOS_DYNAMIC_ON="y"
|
||||
}
|
||||
|
||||
|
||||
logger -t nft-qos-dynamic "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
|
||||
|
||||
case "$ACTION" in
|
||||
add | update | remove)
|
||||
qosdef_validate_section_dynamic
|
||||
[ -z "$NFT_QOS_DYNAMIC_ON" ] && return
|
||||
|
||||
qosdef_init_env
|
||||
qosdef_flush_dynamic
|
||||
|
||||
qosdef_init_header
|
||||
qosdef_init_dynamic
|
||||
qosdef_init_done
|
||||
qosdef_start
|
||||
;;
|
||||
esac
|
23
package/lean/nft-qos/files/nft-qos-monitor.hotplug
Normal file
23
package/lean/nft-qos/files/nft-qos-monitor.hotplug
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
export initscript="nft-qos-monitor"
|
||||
|
||||
. /lib/nft-qos/monitor.sh
|
||||
|
||||
logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
|
||||
|
||||
case "$ACTION" in
|
||||
add | update)
|
||||
qosdef_init_env
|
||||
qosdef_init_monitor
|
||||
qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME
|
||||
;;
|
||||
remove)
|
||||
qosdef_init_env
|
||||
qosdef_init_monitor
|
||||
qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME
|
||||
;;
|
||||
esac
|
106
package/lean/nft-qos/files/nft-qos.config
Normal file
106
package/lean/nft-qos/files/nft-qos.config
Normal file
@ -0,0 +1,106 @@
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
# This is the sample for nft-qos configuration file,
|
||||
# which will generate a nftables script in /tmp/qos.nft
|
||||
#
|
||||
|
||||
# Getting Started
|
||||
# Official site :
|
||||
# https://netfilter.org/projects/nftables/index.html
|
||||
# What is nftables :
|
||||
# https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
|
||||
#
|
||||
|
||||
# Basic Operations
|
||||
# Configuring Tables :
|
||||
# https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
|
||||
# Configuring Chains :
|
||||
# https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains
|
||||
# Configuring Rules :
|
||||
# https://wiki.nftables.org/wiki-nftables/index.php/Simple_rule_management
|
||||
# Quick Reference (recommended) :
|
||||
# https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes
|
||||
# https://netfilter.org/projects/nftables/manpage.html
|
||||
#
|
||||
|
||||
config default default
|
||||
# Enable Flag for limit rate
|
||||
option limit_enable '1'
|
||||
|
||||
# Options for enable Static QoS (rate limit)
|
||||
option limit_type 'static'
|
||||
# Options for Static QoS (rate limit)
|
||||
option static_unit_dl 'kbytes'
|
||||
option static_unit_ul 'kbytes'
|
||||
option static_rate_dl '50'
|
||||
option static_rate_ul '50'
|
||||
|
||||
# Options for enable Dynamic QoS
|
||||
# This option can not compatible with Static QoS
|
||||
# option limit_type 'dynamic'
|
||||
|
||||
# For Dynamic QoS Samples (unit of bandwidth is Mbps):
|
||||
option dynamic_cidr '192.168.1.0/24'
|
||||
option dynamic_cidr6 'AAAA:BBBB::1/64'
|
||||
option dynamic_bw_up '100'
|
||||
option dynamic_bw_down '100'
|
||||
|
||||
# White list for static/dynamic limit
|
||||
# list limit_whitelist '192.168.1.225'
|
||||
# list limit_whitelist '192.168.1.0/24'
|
||||
# list limit_whitelist 'ABCD:CDEF::1/64'
|
||||
|
||||
# Options for Traffic Priority
|
||||
option priority_enable '0'
|
||||
option priority_netdev 'lan'
|
||||
|
||||
|
||||
#
|
||||
# For Static QoS Rate Limit Samples :
|
||||
#
|
||||
# For Download :
|
||||
#config download
|
||||
# option hostname 'My PC'
|
||||
# option unit 'kbytes'
|
||||
# option ipaddr '192.168.1.224'
|
||||
# option rate '128'
|
||||
#
|
||||
# For Upload :
|
||||
#config upload
|
||||
# option hostname 'office-pc'
|
||||
# option unit 'mbytes'
|
||||
# option ipaddr 'ABCD:FFED::1/64'
|
||||
# option rate '1024'
|
||||
#
|
||||
#
|
||||
# Traffic Priority Samples :
|
||||
#
|
||||
# protocol : tcp, udp, udplite, sctp, dccp, tcp is default
|
||||
# priority : integer between 1-11, 1 is default
|
||||
# service : you can input a integer or service name, e.g. '22', '11-22', 'telnet', 'ssh, http, ftp', etc
|
||||
#
|
||||
#config priority
|
||||
# option protocol 'tcp'
|
||||
# option priority '-400'
|
||||
# option service '23'
|
||||
# option comment '?'
|
||||
#
|
||||
#config priority
|
||||
# option protocol 'udp'
|
||||
# option priority '-400'
|
||||
# option service 'https'
|
||||
# option comment '?'
|
||||
#
|
||||
#config priority
|
||||
# option protocol 'dccp'
|
||||
# option priority '0'
|
||||
# option service '22-35'
|
||||
# option comment '?'
|
||||
#
|
||||
#config priority
|
||||
# option protocol 'dccp'
|
||||
# option priority '300'
|
||||
# option service 'ftp,ssh,http'
|
||||
# option comment '?'
|
||||
#
|
41
package/lean/nft-qos/files/nft-qos.init
Executable file
41
package/lean/nft-qos/files/nft-qos.init
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2018 rosysong@rosinson.com
|
||||
#
|
||||
|
||||
. /lib/nft-qos/core.sh
|
||||
. /lib/nft-qos/monitor.sh
|
||||
. /lib/nft-qos/dynamic.sh
|
||||
. /lib/nft-qos/static.sh
|
||||
. /lib/nft-qos/priority.sh
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger nft-qos
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load nft-qos
|
||||
|
||||
qosdef_init_env
|
||||
qosdef_flush_static
|
||||
qosdef_flush_dynamic
|
||||
qosdef_remove_priority
|
||||
|
||||
qosdef_init_header
|
||||
qosdef_init_monitor
|
||||
qosdef_init_dynamic
|
||||
qosdef_init_static
|
||||
qosdef_init_priority
|
||||
qosdef_init_done
|
||||
qosdef_start
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
qosdef_flush_dynamic
|
||||
qosdef_flush_static
|
||||
qosdef_remove_priority
|
||||
qosdef_clean_cache
|
||||
}
|
@ -112,7 +112,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
{
|
||||
--- a/include/linux/gpio/consumer.h
|
||||
+++ b/include/linux/gpio/consumer.h
|
||||
@@ -531,6 +531,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
|
||||
@@ -533,6 +533,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_
|
||||
|
||||
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
|
||||
|
||||
@ -120,7 +120,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
|
||||
int gpiod_export_link(struct device *dev, const char *name,
|
||||
struct gpio_desc *desc);
|
||||
@@ -538,6 +539,13 @@ void gpiod_unexport(struct gpio_desc *de
|
||||
@@ -540,6 +541,13 @@ void gpiod_unexport(struct gpio_desc *de
|
||||
|
||||
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
|
||||
|
||||
|
@ -76,7 +76,7 @@ Subject: [PATCH 001/454] arm: partially revert
|
||||
|
||||
--- a/arch/arm/mm/proc-macros.S
|
||||
+++ b/arch/arm/mm/proc-macros.S
|
||||
@@ -325,6 +325,8 @@ ENTRY(\name\()_cache_fns)
|
||||
@@ -335,6 +335,8 @@ ENTRY(\name\()_cache_fns)
|
||||
.long \name\()_flush_kern_dcache_area
|
||||
.long \name\()_dma_map_area
|
||||
.long \name\()_dma_unmap_area
|
||||
|
@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -1971,7 +1975,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1972,7 +1976,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(skb);
|
||||
skb_trim(skb, skb->len - 4); /* remove fcs */
|
||||
@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1989,7 +1994,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
@@ -1990,7 +1995,8 @@ static int smsc95xx_rx_fixup(struct usbn
|
||||
if (dev->net->features & NETIF_F_RXCSUM)
|
||||
smsc95xx_rx_csum_offload(ax_skb);
|
||||
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
|
||||
|
@ -47,7 +47,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
struct bcm2835_dmadev {
|
||||
struct dma_device ddev;
|
||||
@@ -925,6 +927,9 @@ static int bcm2835_dma_probe(struct plat
|
||||
@@ -905,6 +907,9 @@ static int bcm2835_dma_probe(struct plat
|
||||
base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
@ -57,7 +57,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
|
||||
od->base = base;
|
||||
|
||||
@@ -962,6 +967,9 @@ static int bcm2835_dma_probe(struct plat
|
||||
@@ -942,6 +947,9 @@ static int bcm2835_dma_probe(struct plat
|
||||
goto err_no_dma;
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
/* get irqs for each channel that we support */
|
||||
for (i = 0; i <= BCM2835_DMA_MAX_DMA_CHAN_SUPPORTED; i++) {
|
||||
/* skip masked out channels */
|
||||
@@ -1036,6 +1044,7 @@ static int bcm2835_dma_remove(struct pla
|
||||
@@ -1016,6 +1024,7 @@ static int bcm2835_dma_remove(struct pla
|
||||
{
|
||||
struct bcm2835_dmadev *od = platform_get_drvdata(pdev);
|
||||
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
|
||||
dma_async_device_unregister(&od->ddev);
|
||||
bcm2835_dma_free(od);
|
||||
|
||||
@@ -1051,7 +1060,22 @@ static struct platform_driver bcm2835_dm
|
||||
@@ -1031,7 +1040,22 @@ static struct platform_driver bcm2835_dm
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -102,7 +102,7 @@ Signed-off-by: Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
|
||||
vfp_save_state(&thread->vfpstate, fpexc | FPEXC_EN);
|
||||
fmxr(FPEXC, fpexc);
|
||||
}
|
||||
@@ -602,6 +609,8 @@ int vfp_restore_user_hwstate(struct user
|
||||
@@ -598,6 +605,8 @@ int vfp_restore_user_hwstate(struct user
|
||||
struct thread_info *thread = current_thread_info();
|
||||
struct vfp_hard_struct *hwstate = &thread->vfpstate.hard;
|
||||
unsigned long fpexc;
|
||||
@ -111,7 +111,7 @@ Signed-off-by: Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
|
||||
|
||||
/* Disable VFP to avoid corrupting the new thread state. */
|
||||
vfp_flush_hwstate(thread);
|
||||
@@ -624,8 +633,12 @@ int vfp_restore_user_hwstate(struct user
|
||||
@@ -620,8 +629,12 @@ int vfp_restore_user_hwstate(struct user
|
||||
/* Ensure the VFP is enabled. */
|
||||
fpexc |= FPEXC_EN;
|
||||
|
||||
@ -126,7 +126,7 @@ Signed-off-by: Christopher Alexander Tobias Schulze <cat.schulze@alice-dsl.net>
|
||||
hwstate->fpexc = fpexc;
|
||||
|
||||
hwstate->fpinst = ufp_exc->fpinst;
|
||||
@@ -695,7 +708,8 @@ void kernel_neon_begin(void)
|
||||
@@ -691,7 +704,8 @@ void kernel_neon_begin(void)
|
||||
cpu = get_cpu();
|
||||
|
||||
fpexc = fmrx(FPEXC) | FPEXC_EN;
|
||||
|
@ -841,7 +841,7 @@ Signed-off-by: Malik Olivier Boussejra <malik@boussejra.com>
|
||||
}
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5084,7 +5084,7 @@ static void port_event(struct usb_hub *h
|
||||
@@ -5094,7 +5094,7 @@ static void port_event(struct usb_hub *h
|
||||
if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
|
||||
u16 status = 0, unused;
|
||||
|
||||
|
@ -170,7 +170,7 @@ bcm2708_fb: Add ioctl for reading gpu memory through dma
|
||||
platform_set_drvdata(dev, fb);
|
||||
--- a/drivers/video/fbdev/core/fbmem.c
|
||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
||||
@@ -1086,6 +1086,31 @@ fb_blank(struct fb_info *info, int blank
|
||||
@@ -1090,6 +1090,31 @@ fb_blank(struct fb_info *info, int blank
|
||||
}
|
||||
EXPORT_SYMBOL(fb_blank);
|
||||
|
||||
@ -202,7 +202,7 @@ bcm2708_fb: Add ioctl for reading gpu memory through dma
|
||||
static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
@@ -1096,6 +1121,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1100,6 +1125,7 @@ static long do_fb_ioctl(struct fb_info *
|
||||
struct fb_cmap cmap_from;
|
||||
struct fb_cmap_user cmap;
|
||||
struct fb_event event;
|
||||
@ -210,7 +210,7 @@ bcm2708_fb: Add ioctl for reading gpu memory through dma
|
||||
void __user *argp = (void __user *)arg;
|
||||
long ret = 0;
|
||||
|
||||
@@ -1213,6 +1239,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
@@ -1217,6 +1243,15 @@ static long do_fb_ioctl(struct fb_info *
|
||||
unlock_fb_info(info);
|
||||
console_unlock();
|
||||
break;
|
||||
@ -226,7 +226,7 @@ bcm2708_fb: Add ioctl for reading gpu memory through dma
|
||||
default:
|
||||
if (!lock_fb_info(info))
|
||||
return -ENODEV;
|
||||
@@ -1358,6 +1393,7 @@ static long fb_compat_ioctl(struct file
|
||||
@@ -1362,6 +1397,7 @@ static long fb_compat_ioctl(struct file
|
||||
case FBIOPAN_DISPLAY:
|
||||
case FBIOGET_CON2FBMAP:
|
||||
case FBIOPUT_CON2FBMAP:
|
||||
|
@ -58,7 +58,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
#define memset(p,v,n) \
|
||||
--- a/arch/arm/include/asm/uaccess.h
|
||||
+++ b/arch/arm/include/asm/uaccess.h
|
||||
@@ -459,6 +459,9 @@ do { \
|
||||
@@ -496,6 +496,9 @@ do { \
|
||||
extern unsigned long __must_check
|
||||
arm_copy_from_user(void *to, const void __user *from, unsigned long n);
|
||||
|
||||
@ -273,7 +273,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
#ifdef CONFIG_CPU_SPECTRE
|
||||
get_thread_info r3
|
||||
ldr r3, [r3, #TI_ADDR_LIMIT]
|
||||
@@ -103,6 +104,7 @@ ENTRY(arm_copy_from_user)
|
||||
@@ -99,6 +100,7 @@ ENTRY(arm_copy_from_user)
|
||||
#include "copy_template.S"
|
||||
|
||||
ENDPROC(arm_copy_from_user)
|
||||
@ -1507,7 +1507,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
unsigned long ua_flags = uaccess_save_and_enable();
|
||||
n = __copy_to_user_std(to, from, n);
|
||||
uaccess_restore(ua_flags);
|
||||
@@ -156,6 +252,26 @@ arm_copy_to_user(void __user *to, const
|
||||
@@ -157,6 +253,26 @@ arm_copy_to_user(void __user *to, const
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ Fixes: 98830d91da08 ("drm/vc4: Add T-format scanout support.")
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -547,14 +547,24 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -549,14 +549,24 @@ static int vc4_plane_mode_set(struct drm
|
||||
tiling = SCALER_CTL0_TILING_LINEAR;
|
||||
pitch0 = VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH);
|
||||
break;
|
||||
|
@ -778,7 +778,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20171019125748.3152-1-boris.
|
||||
#include "vc4_drv.h"
|
||||
#include "vc4_regs.h"
|
||||
|
||||
@@ -777,21 +778,40 @@ static int vc4_prepare_fb(struct drm_pla
|
||||
@@ -779,21 +780,40 @@ static int vc4_prepare_fb(struct drm_pla
|
||||
{
|
||||
struct vc4_bo *bo;
|
||||
struct dma_fence *fence;
|
||||
|
@ -66,7 +66,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/563872b69c1e5df142cb15ebfca7
|
||||
},
|
||||
};
|
||||
|
||||
@@ -625,15 +628,8 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -627,15 +630,8 @@ static int vc4_plane_mode_set(struct drm
|
||||
* The pointers may be any byte address.
|
||||
*/
|
||||
vc4_state->ptr0_offset = vc4_state->dlist_count;
|
||||
|
@ -22,7 +22,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-2-git-send-
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -619,13 +619,14 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -621,13 +621,14 @@ static int vc4_plane_mode_set(struct drm
|
||||
SCALER_POS1_SCL_HEIGHT));
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-3-git-send-
|
||||
};
|
||||
|
||||
static inline struct vc4_plane_state *
|
||||
@@ -522,6 +528,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -524,6 +530,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
u32 ctl0_offset = vc4_state->dlist_count;
|
||||
const struct hvs_format *format = vc4_get_hvs_format(fb->format->format);
|
||||
int num_planes = drm_format_num_planes(format->drm);
|
||||
@ -44,7 +44,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/1520556817-97297-3-git-send-
|
||||
u32 scl0, scl1, pitch0;
|
||||
u32 lbm_size, tiling;
|
||||
unsigned long irqflags;
|
||||
@@ -705,6 +712,16 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -707,6 +714,16 @@ static int vc4_plane_mode_set(struct drm
|
||||
vc4_state->dlist[ctl0_offset] |=
|
||||
VC4_SET_FIELD(vc4_state->dlist_count, SCALER_CTL0_SIZE);
|
||||
|
||||
|
@ -33,7 +33,7 @@ Link: https://patchwork.freedesktop.org/patch/170828/
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -868,6 +868,32 @@ out:
|
||||
@@ -870,6 +870,32 @@ out:
|
||||
ctx);
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ Link: https://patchwork.freedesktop.org/patch/170828/
|
||||
static const struct drm_plane_funcs vc4_plane_funcs = {
|
||||
.update_plane = vc4_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
@@ -876,6 +902,7 @@ static const struct drm_plane_funcs vc4_
|
||||
@@ -878,6 +904,7 @@ static const struct drm_plane_funcs vc4_
|
||||
.reset = vc4_plane_reset,
|
||||
.atomic_duplicate_state = vc4_plane_duplicate_state,
|
||||
.atomic_destroy_state = vc4_plane_destroy_state,
|
||||
@ -74,7 +74,7 @@ Link: https://patchwork.freedesktop.org/patch/170828/
|
||||
};
|
||||
|
||||
struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
||||
@@ -887,6 +914,11 @@ struct drm_plane *vc4_plane_init(struct
|
||||
@@ -889,6 +916,11 @@ struct drm_plane *vc4_plane_init(struct
|
||||
u32 num_formats = 0;
|
||||
int ret = 0;
|
||||
unsigned i;
|
||||
@ -86,7 +86,7 @@ Link: https://patchwork.freedesktop.org/patch/170828/
|
||||
|
||||
vc4_plane = devm_kzalloc(dev->dev, sizeof(*vc4_plane),
|
||||
GFP_KERNEL);
|
||||
@@ -907,7 +939,7 @@ struct drm_plane *vc4_plane_init(struct
|
||||
@@ -909,7 +941,7 @@ struct drm_plane *vc4_plane_init(struct
|
||||
ret = drm_universal_plane_init(dev, plane, 0,
|
||||
&vc4_plane_funcs,
|
||||
formats, num_formats,
|
||||
|
@ -21,7 +21,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-2-eric@
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -888,7 +888,9 @@ static bool vc4_format_mod_supported(str
|
||||
@@ -890,7 +890,9 @@ static bool vc4_format_mod_supported(str
|
||||
case DRM_FORMAT_YUV420:
|
||||
case DRM_FORMAT_YVU420:
|
||||
case DRM_FORMAT_NV12:
|
||||
|
@ -32,7 +32,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
|
||||
--- a/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
|
||||
@@ -467,11 +467,13 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -469,11 +469,13 @@ static int vc4_plane_mode_set(struct drm
|
||||
struct drm_framebuffer *fb = state->fb;
|
||||
u32 ctl0_offset = vc4_state->dlist_count;
|
||||
const struct hvs_format *format = vc4_get_hvs_format(fb->format->format);
|
||||
@ -46,7 +46,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
int ret, i;
|
||||
|
||||
ret = vc4_plane_setup_clipping_and_scaling(state);
|
||||
@@ -511,7 +513,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -513,7 +515,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
scl1 = vc4_get_scl_field(state, 0);
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
tiling = SCALER_CTL0_TILING_LINEAR;
|
||||
pitch0 = VC4_SET_FIELD(fb->pitches[0], SCALER_SRC_PITCH);
|
||||
@@ -534,6 +536,49 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -536,6 +538,49 @@ static int vc4_plane_mode_set(struct drm
|
||||
break;
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
default:
|
||||
DRM_DEBUG_KMS("Unsupported FB tiling flag 0x%16llx",
|
||||
(long long)fb->modifier);
|
||||
@@ -544,7 +589,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -546,7 +591,7 @@ static int vc4_plane_mode_set(struct drm
|
||||
vc4_dlist_write(vc4_state,
|
||||
SCALER_CTL0_VALID |
|
||||
(format->pixel_order << SCALER_CTL0_ORDER_SHIFT) |
|
||||
@ -114,7 +114,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
VC4_SET_FIELD(tiling, SCALER_CTL0_TILING) |
|
||||
(vc4_state->is_unity ? SCALER_CTL0_UNITY : 0) |
|
||||
VC4_SET_FIELD(scl0, SCALER_CTL0_SCL0) |
|
||||
@@ -598,8 +643,13 @@ static int vc4_plane_mode_set(struct drm
|
||||
@@ -600,8 +645,13 @@ static int vc4_plane_mode_set(struct drm
|
||||
|
||||
/* Pitch word 1/2 */
|
||||
for (i = 1; i < num_planes; i++) {
|
||||
@ -130,7 +130,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
}
|
||||
|
||||
/* Colorspace conversion words */
|
||||
@@ -882,13 +932,30 @@ static bool vc4_format_mod_supported(str
|
||||
@@ -884,13 +934,30 @@ static bool vc4_format_mod_supported(str
|
||||
case DRM_FORMAT_BGR565:
|
||||
case DRM_FORMAT_ARGB1555:
|
||||
case DRM_FORMAT_XRGB1555:
|
||||
@ -164,7 +164,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20180316220435.31416-3-eric@
|
||||
case DRM_FORMAT_NV16:
|
||||
case DRM_FORMAT_NV61:
|
||||
default:
|
||||
@@ -918,6 +985,9 @@ struct drm_plane *vc4_plane_init(struct
|
||||
@@ -920,6 +987,9 @@ struct drm_plane *vc4_plane_init(struct
|
||||
unsigned i;
|
||||
static const uint64_t modifiers[] = {
|
||||
DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED,
|
||||
|
@ -1,50 +0,0 @@
|
||||
From c2eae29f6503cf29ac6a204c51132cfed33d203e Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Fri, 26 Oct 2018 17:40:44 +0100
|
||||
Subject: [PATCH 434/454] mmc/bcm2835: Recover from MMC_SEND_EXT_CSD
|
||||
|
||||
If the user issues an "mmc extcsd read", the SD controller receives
|
||||
what it thinks is a SEND_IF_COND command with an unexpected data block.
|
||||
The resulting operations leave the FSM stuck in READWAIT, a state which
|
||||
persists until the MMC framework resets the controller, by which point
|
||||
the root filesystem is likely to have been unmounted.
|
||||
|
||||
A less heavyweight solution is to detect the condition and nudge the
|
||||
FSM by asserting the (self-clearing) FORCE_DATA_MODE bit.
|
||||
|
||||
N.B. This workaround was essentially discovered by accident and without
|
||||
a full understanding the inner workings of the controller, so it is
|
||||
fortunate that the "fix" only modifies error paths.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/2728
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/mmc/host/bcm2835.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/drivers/mmc/host/bcm2835.c
|
||||
+++ b/drivers/mmc/host/bcm2835.c
|
||||
@@ -772,6 +772,8 @@ static void bcm2835_finish_command(struc
|
||||
|
||||
if (!(sdhsts & SDHSTS_CRC7_ERROR) ||
|
||||
(host->cmd->opcode != MMC_SEND_OP_COND)) {
|
||||
+ u32 edm, fsm;
|
||||
+
|
||||
if (sdhsts & SDHSTS_CMD_TIME_OUT) {
|
||||
host->cmd->error = -ETIMEDOUT;
|
||||
} else {
|
||||
@@ -780,6 +782,13 @@ static void bcm2835_finish_command(struc
|
||||
bcm2835_dumpregs(host);
|
||||
host->cmd->error = -EILSEQ;
|
||||
}
|
||||
+ edm = readl(host->ioaddr + SDEDM);
|
||||
+ fsm = edm & SDEDM_FSM_MASK;
|
||||
+ if (fsm == SDEDM_FSM_READWAIT ||
|
||||
+ fsm == SDEDM_FSM_WRITESTART1)
|
||||
+ /* Kick the FSM out of its wait */
|
||||
+ writel(edm | SDEDM_FORCE_DATA_MODE,
|
||||
+ host->ioaddr + SDEDM);
|
||||
bcm2835_finish_request(host);
|
||||
return;
|
||||
}
|
@ -174,7 +174,6 @@ CONFIG_HAVE_SMP=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
# CONFIG_HNS3 is not set
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
@ -219,6 +218,7 @@ CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGHT_HAVE_PCI=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
@ -297,7 +297,6 @@ CONFIG_PCI=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
# CONFIG_PCI_FTPCI100 is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
@ -310,7 +309,6 @@ CONFIG_PPPOE=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PPS_CLIENT_GPIO=y
|
||||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_RAID_ATTRS=y
|
||||
|
370
target/linux/cns3xxx/config-4.19
Normal file
370
target/linux/cns3xxx/config-4.19
Normal file
@ -0,0 +1,370 @@
|
||||
# CONFIG_AIO is not set
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_CNS3XXX=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_ARCH_HAS_PHYS_TO_DMA=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SG_CHAIN=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
# CONFIG_ATA_SFF is not set
|
||||
CONFIG_ATA_VERBOSE_ERROR=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_CNS3XXX_ETH=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COREDUMP=y
|
||||
CONFIG_CPU_32v6=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_ABRT_EV6=y
|
||||
# CONFIG_CPU_BPREDICT_DISABLE is not set
|
||||
CONFIG_CPU_CACHE_V6=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
# CONFIG_CPU_ICACHE_DISABLE is not set
|
||||
CONFIG_CPU_PABRT_V6=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
# CONFIG_CPU_SW_DOMAIN_PAN is not set
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V6=y
|
||||
CONFIG_CPU_V6K=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_ALIGN_RODATA=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
# CONFIG_DEBUG_USER is not set
|
||||
CONFIG_DMA_CACHE_FIQ_BROADCAST=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_ELF_CORE=y
|
||||
CONFIG_FIQ=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARM_SCU=y
|
||||
CONFIG_HAVE_ARM_TWD=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_OPTPROBES=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_PROC_CPU=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_CNS3XXX=y
|
||||
# CONFIG_INITRAMFS_FORCE is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IP6_NF_FILTER=m
|
||||
CONFIG_IP6_NF_IPTABLES=m
|
||||
CONFIG_IP6_NF_MANGLE=m
|
||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_IPV6_MROUTE=y
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
# CONFIG_IPV6_PIMSM_V2 is not set
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
CONFIG_IP_MROUTE_COMMON=y
|
||||
CONFIG_IP_NF_FILTER=m
|
||||
CONFIG_IP_NF_IPTABLES=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP_NF_NAT=m
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_TARGET_REDIRECT=m
|
||||
CONFIG_IP_NF_TARGET_REJECT=m
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KALLSYMS_UNCOMPRESSED=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
# CONFIG_LEDS_TRIGGER_NETDEV is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
# CONFIG_MACH_CNS3420VB is not set
|
||||
CONFIG_MACH_GW2388=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGHT_HAVE_PCI=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_CNS3XXX=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
# CONFIG_MMC_TIFM_SD is not set
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MPCORE_WATCHDOG=y
|
||||
CONFIG_MTD_M25P80=y
|
||||
# CONFIG_MTD_OF_PARTS is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
# CONFIG_MTD_PHYSMAP_OF is not set
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_UIMAGE_FW=y
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NETFILTER_ADVANCED=y
|
||||
CONFIG_NETFILTER_XTABLES=m
|
||||
CONFIG_NETFILTER_XT_MARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=m
|
||||
CONFIG_NETFILTER_XT_MATCH_TIME=m
|
||||
CONFIG_NETFILTER_XT_NAT=m
|
||||
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
||||
CONFIG_NETFILTER_XT_TARGET_REDIRECT=m
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_RTCACHE=m
|
||||
CONFIG_NF_DEFRAG_IPV4=m
|
||||
CONFIG_NF_DEFRAG_IPV6=m
|
||||
CONFIG_NF_LOG_COMMON=m
|
||||
CONFIG_NF_LOG_IPV4=m
|
||||
CONFIG_NF_LOG_IPV6=m
|
||||
CONFIG_NF_NAT=m
|
||||
CONFIG_NF_NAT_IPV4=m
|
||||
CONFIG_NF_NAT_NEEDED=y
|
||||
CONFIG_NF_NAT_REDIRECT=y
|
||||
CONFIG_NF_REJECT_IPV4=m
|
||||
CONFIG_NF_REJECT_IPV6=m
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_BOOTMEM=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NTP_PPS=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
# CONFIG_PCI_V3_SEMI is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PL310_ERRATA_588369=y
|
||||
CONFIG_PL310_ERRATA_727915=y
|
||||
CONFIG_PL310_ERRATA_753970=y
|
||||
CONFIG_PL310_ERRATA_769419=y
|
||||
CONFIG_PPP=m
|
||||
CONFIG_PPPOE=m
|
||||
CONFIG_PPP_ASYNC=m
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PPS_CLIENT_GPIO=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_RAID_ATTRS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_REFCOUNT_FULL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_DS1672=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SENSORS_AD7418=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=3
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=3
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SLHC=m
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_CNS3XXX=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
# CONFIG_STAGING is not set
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_CNS3XXX_EHCI=y
|
||||
CONFIG_USB_CNS3XXX_OHCI=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_HOST=y
|
||||
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
# CONFIG_USB_ROLE_SWITCH is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
@ -17,15 +17,17 @@
|
||||
writel(reload, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
|
||||
ctrl |= (1 << 0) | (1 << 2) | (1 << 9);
|
||||
writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
@@ -175,7 +176,7 @@ static struct clock_event_device cns3xxx
|
||||
@@ -175,8 +176,8 @@ static struct clock_event_device cns3xxx
|
||||
.set_state_oneshot = cns3xxx_set_oneshot,
|
||||
.tick_resume = cns3xxx_shutdown,
|
||||
.set_next_event = cns3xxx_timer_set_next_event,
|
||||
- .rating = 350,
|
||||
- .cpumask = cpu_all_mask,
|
||||
+ .rating = 300,
|
||||
.cpumask = cpu_all_mask,
|
||||
+ .cpumask = cpu_possible_mask,
|
||||
};
|
||||
|
||||
static void __init cns3xxx_clockevents_init(unsigned int timer_irq)
|
||||
@@ -220,6 +221,32 @@ static void __init cns3xxx_init_twd(void
|
||||
twd_local_timer_register(&cns3xx_twd_local_timer);
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
--- a/arch/arm/mach-cns3xxx/Makefile
|
||||
+++ b/arch/arm/mach-cns3xxx/Makefile
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
|
||||
+
|
||||
obj-$(CONFIG_ARCH_CNS3XXX) += cns3xxx.o
|
||||
cns3xxx-y += core.o pm.o
|
||||
cns3xxx-$(CONFIG_ATAGS) += devices.o
|
@ -0,0 +1,10 @@
|
||||
--- a/arch/arm/tools/mach-types
|
||||
+++ b/arch/arm/tools/mach-types
|
||||
@@ -449,6 +449,7 @@ gplugd MACH_GPLUGD GPLUGD 2625
|
||||
qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627
|
||||
mx23evk MACH_MX23EVK MX23EVK 2629
|
||||
ap4evb MACH_AP4EVB AP4EVB 2630
|
||||
+gw2388 MACH_GW2388 GW2388 2635
|
||||
mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650
|
||||
guruplug MACH_GURUPLUG GURUPLUG 2659
|
||||
spear310 MACH_SPEAR310 SPEAR310 2660
|
@ -0,0 +1,80 @@
|
||||
--- a/arch/arm/include/asm/glue-cache.h
|
||||
+++ b/arch/arm/include/asm/glue-cache.h
|
||||
@@ -156,9 +156,15 @@ static inline void nop_dma_unmap_area(co
|
||||
#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
|
||||
#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
|
||||
#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
|
||||
-#define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area)
|
||||
|
||||
-#define dmac_flush_range __glue(_CACHE,_dma_flush_range)
|
||||
+#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
|
||||
+# define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area)
|
||||
+# define dmac_flush_range __glue(_CACHE,_dma_flush_range)
|
||||
+#else
|
||||
+# define __cpuc_flush_dcache_area __glue(fiq,_flush_kern_dcache_area)
|
||||
+# define dmac_flush_range __glue(fiq,_dma_flush_range)
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
#endif
|
||||
--- a/arch/arm/mm/Kconfig
|
||||
+++ b/arch/arm/mm/Kconfig
|
||||
@@ -916,6 +916,17 @@ config DMA_CACHE_RWFO
|
||||
in hardware, other workarounds are needed (e.g. cache
|
||||
maintenance broadcasting in software via FIQ).
|
||||
|
||||
+config DMA_CACHE_FIQ_BROADCAST
|
||||
+ bool "Enable fiq broadcast DMA cache maintenance"
|
||||
+ depends on CPU_V6K && SMP
|
||||
+ select FIQ
|
||||
+ help
|
||||
+ The Snoop Control Unit on ARM11MPCore does not detect the
|
||||
+ cache maintenance operations and the dma_{map,unmap}_area()
|
||||
+ functions may leave stale cache entries on other CPUs. By
|
||||
+ enabling this option, fiq broadcast in the ARMv6
|
||||
+ DMA cache maintenance functions is performed.
|
||||
+
|
||||
config OUTER_CACHE
|
||||
bool
|
||||
|
||||
--- a/arch/arm/mm/flush.c
|
||||
+++ b/arch/arm/mm/flush.c
|
||||
@@ -319,6 +319,7 @@ void __sync_icache_dcache(pte_t pteval)
|
||||
void flush_dcache_page(struct page *page)
|
||||
{
|
||||
struct address_space *mapping;
|
||||
+ bool skip_broadcast = true;
|
||||
|
||||
/*
|
||||
* The zero page is never written to, so never has any dirty
|
||||
@@ -335,7 +336,10 @@ void flush_dcache_page(struct page *page
|
||||
|
||||
mapping = page_mapping_file(page);
|
||||
|
||||
- if (!cache_ops_need_broadcast() &&
|
||||
+#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
|
||||
+ skip_broadcast = !cache_ops_need_broadcast();
|
||||
+#endif
|
||||
+ if (skip_broadcast &&
|
||||
mapping && !page_mapcount(page))
|
||||
clear_bit(PG_dcache_clean, &page->flags);
|
||||
else {
|
||||
--- a/arch/arm/mm/dma.h
|
||||
+++ b/arch/arm/mm/dma.h
|
||||
@@ -5,8 +5,13 @@
|
||||
#include <asm/glue-cache.h>
|
||||
|
||||
#ifndef MULTI_CACHE
|
||||
-#define dmac_map_area __glue(_CACHE,_dma_map_area)
|
||||
-#define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
|
||||
+#ifndef CONFIG_DMA_CACHE_FIQ_BROADCAST
|
||||
+# define dmac_map_area __glue(_CACHE,_dma_map_area)
|
||||
+# define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
|
||||
+#else
|
||||
+# define dmac_map_area __glue(fiq,_dma_map_area)
|
||||
+# define dmac_unmap_area __glue(fiq,_dma_unmap_area)
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* These are private to the dma-mapping API. Do not use directly.
|
184
target/linux/cns3xxx/patches-4.19/020-watchdog_support.patch
Normal file
184
target/linux/cns3xxx/patches-4.19/020-watchdog_support.patch
Normal file
@ -0,0 +1,184 @@
|
||||
Add a watchdog driver for ARM MPcore processors.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
--- a/drivers/watchdog/Kconfig
|
||||
+++ b/drivers/watchdog/Kconfig
|
||||
@@ -375,6 +375,13 @@ config KS8695_WATCHDOG
|
||||
Watchdog timer embedded into KS8695 processor. This will reboot your
|
||||
system when the timeout is reached.
|
||||
|
||||
+config MPCORE_WATCHDOG
|
||||
+ tristate "MPcore watchdog"
|
||||
+ depends on HAVE_ARM_TWD
|
||||
+ select WATCHDOG_CORE
|
||||
+ help
|
||||
+ Watchdog timer embedded into the MPcore system
|
||||
+
|
||||
config HAVE_S3C2410_WATCHDOG
|
||||
bool
|
||||
help
|
||||
--- a/drivers/watchdog/Makefile
|
||||
+++ b/drivers/watchdog/Makefile
|
||||
@@ -49,6 +49,7 @@ obj-$(CONFIG_977_WATCHDOG) += wdt977.o
|
||||
obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o
|
||||
obj-$(CONFIG_IXP4XX_WATCHDOG) += ixp4xx_wdt.o
|
||||
obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o
|
||||
+obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o
|
||||
obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
|
||||
obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
|
||||
obj-$(CONFIG_SAMA5D4_WATCHDOG) += sama5d4_wdt.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/watchdog/mpcore_wdt.c
|
||||
@@ -0,0 +1,118 @@
|
||||
+/*
|
||||
+ * Watchdog driver for ARM MPcore
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Felix Fietkau <nbd@nbd.name>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/export.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/watchdog.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <asm/smp_twd.h>
|
||||
+
|
||||
+static void __iomem *wdt_base;
|
||||
+static int wdt_timeout = 60;
|
||||
+
|
||||
+static int mpcore_wdt_keepalive(struct watchdog_device *wdd)
|
||||
+{
|
||||
+ static int perturb;
|
||||
+ u32 count;
|
||||
+
|
||||
+ count = (twd_timer_get_rate() / 256) * wdt_timeout;
|
||||
+
|
||||
+ /* Reload register needs a different value on each refresh */
|
||||
+ count += perturb;
|
||||
+ perturb = !perturb;
|
||||
+
|
||||
+ iowrite32(count, wdt_base + TWD_WDOG_LOAD);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mpcore_wdt_start(struct watchdog_device *wdd)
|
||||
+{
|
||||
+ mpcore_wdt_keepalive(wdd);
|
||||
+
|
||||
+ /* prescale = 256, mode = 1, enable = 1 */
|
||||
+ iowrite32(0x0000FF09, wdt_base + TWD_WDOG_CONTROL);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mpcore_wdt_stop(struct watchdog_device *wdd)
|
||||
+{
|
||||
+ iowrite32(0x12345678, wdt_base + TWD_WDOG_DISABLE);
|
||||
+ iowrite32(0x87654321, wdt_base + TWD_WDOG_DISABLE);
|
||||
+ iowrite32(0x0, wdt_base + TWD_WDOG_CONTROL);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mpcore_wdt_set_timeout(struct watchdog_device *wdd,
|
||||
+ unsigned int timeout)
|
||||
+{
|
||||
+ mpcore_wdt_stop(wdd);
|
||||
+ wdt_timeout = timeout;
|
||||
+ mpcore_wdt_start(wdd);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct watchdog_info mpcore_wdt_info = {
|
||||
+ .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
|
||||
+ .identity = "MPcore Watchdog",
|
||||
+};
|
||||
+
|
||||
+static const struct watchdog_ops mpcore_wdt_ops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .start = mpcore_wdt_start,
|
||||
+ .stop = mpcore_wdt_stop,
|
||||
+ .ping = mpcore_wdt_keepalive,
|
||||
+ .set_timeout = mpcore_wdt_set_timeout,
|
||||
+};
|
||||
+
|
||||
+static struct watchdog_device mpcore_wdt = {
|
||||
+ .info = &mpcore_wdt_info,
|
||||
+ .ops = &mpcore_wdt_ops,
|
||||
+ .min_timeout = 1,
|
||||
+ .max_timeout = 65535,
|
||||
+};
|
||||
+
|
||||
+static int mpcore_wdt_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct resource *res;
|
||||
+ unsigned long rate = twd_timer_get_rate();
|
||||
+
|
||||
+ pr_info("MPCore WD init. clockrate: %lu prescaler: %u countrate: %lu timeout: %us\n", rate, 256, rate / 256, wdt_timeout);
|
||||
+
|
||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ if (!res)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ wdt_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
+ if (IS_ERR(wdt_base))
|
||||
+ return PTR_ERR(wdt_base);
|
||||
+
|
||||
+ watchdog_register_device(&mpcore_wdt);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int mpcore_wdt_remove(struct platform_device *dev)
|
||||
+{
|
||||
+ watchdog_unregister_device(&mpcore_wdt);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver mpcore_wdt_driver = {
|
||||
+ .probe = mpcore_wdt_probe,
|
||||
+ .remove = mpcore_wdt_remove,
|
||||
+ .driver = {
|
||||
+ .name = "mpcore_wdt",
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(mpcore_wdt_driver);
|
||||
+MODULE_AUTHOR("Felix Fietkau <nbd@nbd.name>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
--- a/arch/arm/include/asm/smp_twd.h
|
||||
+++ b/arch/arm/include/asm/smp_twd.h
|
||||
@@ -34,5 +34,6 @@ struct twd_local_timer name __initdata =
|
||||
};
|
||||
|
||||
int twd_local_timer_register(struct twd_local_timer *);
|
||||
+unsigned long twd_timer_get_rate(void);
|
||||
|
||||
#endif
|
||||
--- a/arch/arm/kernel/smp_twd.c
|
||||
+++ b/arch/arm/kernel/smp_twd.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
+#include <linux/export.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/clockchips.h>
|
||||
@@ -380,6 +381,14 @@ int __init twd_local_timer_register(stru
|
||||
return twd_local_timer_common_register(NULL);
|
||||
}
|
||||
|
||||
+/* Needed by mpcore_wdt */
|
||||
+unsigned long twd_timer_get_rate(void)
|
||||
+{
|
||||
+ return twd_timer_rate;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(twd_timer_get_rate);
|
||||
+
|
||||
+
|
||||
#ifdef CONFIG_OF
|
||||
static int __init twd_local_timer_of_register(struct device_node *np)
|
||||
{
|
30
target/linux/cns3xxx/patches-4.19/025-smp_support.patch
Normal file
30
target/linux/cns3xxx/patches-4.19/025-smp_support.patch
Normal file
@ -0,0 +1,30 @@
|
||||
--- a/arch/arm/mach-cns3xxx/Makefile
|
||||
+++ b/arch/arm/mach-cns3xxx/Makefile
|
||||
@@ -6,3 +6,5 @@ cns3xxx-y += core.o pm.o
|
||||
cns3xxx-$(CONFIG_ATAGS) += devices.o
|
||||
cns3xxx-$(CONFIG_PCI) += pcie.o
|
||||
cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
|
||||
+cns3xxx-$(CONFIG_SMP) += platsmp.o headsmp.o
|
||||
+cns3xxx-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||
--- a/arch/arm/mach-cns3xxx/Kconfig
|
||||
+++ b/arch/arm/mach-cns3xxx/Kconfig
|
||||
@@ -3,6 +3,9 @@ menuconfig ARCH_CNS3XXX
|
||||
bool "Cavium Networks CNS3XXX family"
|
||||
depends on ARCH_MULTI_V6
|
||||
select ARM_GIC
|
||||
+ select HAVE_ARM_SCU if SMP
|
||||
+ select HAVE_ARM_TWD
|
||||
+ select HAVE_SMP
|
||||
help
|
||||
Support for Cavium Networks CNS3XXX platform.
|
||||
|
||||
--- a/arch/arm/mach-cns3xxx/core.h
|
||||
+++ b/arch/arm/mach-cns3xxx/core.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <linux/reboot.h>
|
||||
|
||||
+extern struct smp_operations cns3xxx_smp_ops;
|
||||
extern void cns3xxx_timer_init(void);
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
11
target/linux/cns3xxx/patches-4.19/030-pcie_clock.patch
Normal file
11
target/linux/cns3xxx/patches-4.19/030-pcie_clock.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/arch/arm/mach-cns3xxx/pcie.c
|
||||
+++ b/arch/arm/mach-cns3xxx/pcie.c
|
||||
@@ -281,8 +281,6 @@ void __init cns3xxx_pcie_init_late(void)
|
||||
"imprecise external abort");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
|
||||
- cns3xxx_pwr_clk_en(0x1 << PM_CLK_GATE_REG_OFFSET_PCIE(i));
|
||||
- cns3xxx_pwr_soft_rst(0x1 << PM_SOFT_RST_REG_OFFST_PCIE(i));
|
||||
cns3xxx_pcie_check_link(&cns3xxx_pcie[i]);
|
||||
cns3xxx_pcie_hw_init(&cns3xxx_pcie[i]);
|
||||
private_data = &cns3xxx_pcie[i];
|
40
target/linux/cns3xxx/patches-4.19/040-fiq_support.patch
Normal file
40
target/linux/cns3xxx/patches-4.19/040-fiq_support.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- a/arch/arm/mach-cns3xxx/Kconfig
|
||||
+++ b/arch/arm/mach-cns3xxx/Kconfig
|
||||
@@ -6,6 +6,7 @@ menuconfig ARCH_CNS3XXX
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_ARM_TWD
|
||||
select HAVE_SMP
|
||||
+ select FIQ
|
||||
help
|
||||
Support for Cavium Networks CNS3XXX platform.
|
||||
|
||||
--- a/arch/arm/mach-cns3xxx/Makefile
|
||||
+++ b/arch/arm/mach-cns3xxx/Makefile
|
||||
@@ -6,5 +6,5 @@ cns3xxx-y += core.o pm.o
|
||||
cns3xxx-$(CONFIG_ATAGS) += devices.o
|
||||
cns3xxx-$(CONFIG_PCI) += pcie.o
|
||||
cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
|
||||
-cns3xxx-$(CONFIG_SMP) += platsmp.o headsmp.o
|
||||
+cns3xxx-$(CONFIG_SMP) += platsmp.o headsmp.o cns3xxx_fiq.o
|
||||
cns3xxx-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||
--- a/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
@@ -261,6 +261,7 @@
|
||||
#define MISC_PCIE_INT_MASK(x) MISC_MEM_MAP(0x978 + (x) * 0x100)
|
||||
#define MISC_PCIE_INT_STATUS(x) MISC_MEM_MAP(0x97C + (x) * 0x100)
|
||||
|
||||
+#define MISC_FIQ_CPU(x) MISC_MEM_MAP(0xA58 - (x) * 0x4)
|
||||
/*
|
||||
* Power management and clock control
|
||||
*/
|
||||
--- a/arch/arm/mm/Kconfig
|
||||
+++ b/arch/arm/mm/Kconfig
|
||||
@@ -899,7 +899,7 @@ config VDSO
|
||||
|
||||
config DMA_CACHE_RWFO
|
||||
bool "Enable read/write for ownership DMA cache maintenance"
|
||||
- depends on CPU_V6K && SMP
|
||||
+ depends on CPU_V6K && SMP && !ARCH_CNS3XXX
|
||||
default y
|
||||
help
|
||||
The Snoop Control Unit on ARM11MPCore does not detect the
|
43
target/linux/cns3xxx/patches-4.19/045-twd_base.patch
Normal file
43
target/linux/cns3xxx/patches-4.19/045-twd_base.patch
Normal file
@ -0,0 +1,43 @@
|
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb/ehci_pdriver.h>
|
||||
#include <linux/usb/ohci_pdriver.h>
|
||||
+#include <asm/smp_twd.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
@@ -26,6 +27,8 @@
|
||||
#include "core.h"
|
||||
#include "pm.h"
|
||||
|
||||
+#define IRQ_LOCALTIMER 29
|
||||
+
|
||||
static struct map_desc cns3xxx_io_desc[] __initdata = {
|
||||
{
|
||||
.virtual = CNS3XXX_TC11MP_SCU_BASE_VIRT,
|
||||
@@ -198,6 +201,15 @@ static struct irqaction cns3xxx_timer_ir
|
||||
.handler = cns3xxx_timer_interrupt,
|
||||
};
|
||||
|
||||
+static void __init cns3xxx_init_twd(void)
|
||||
+{
|
||||
+ static DEFINE_TWD_LOCAL_TIMER(cns3xx_twd_local_timer,
|
||||
+ CNS3XXX_TC11MP_TWD_BASE,
|
||||
+ IRQ_LOCALTIMER);
|
||||
+
|
||||
+ twd_local_timer_register(&cns3xx_twd_local_timer);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Set up the clock source and clock events devices
|
||||
*/
|
||||
@@ -251,6 +263,7 @@ static void __init __cns3xxx_timer_init(
|
||||
setup_irq(timer_irq, &cns3xxx_timer_irq);
|
||||
|
||||
cns3xxx_clockevents_init(timer_irq);
|
||||
+ cns3xxx_init_twd();
|
||||
}
|
||||
|
||||
void __init cns3xxx_timer_init(void)
|
19
target/linux/cns3xxx/patches-4.19/055-pcie_io.patch
Normal file
19
target/linux/cns3xxx/patches-4.19/055-pcie_io.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -81,6 +81,16 @@ static struct map_desc cns3xxx_io_desc[]
|
||||
.pfn = __phys_to_pfn(CNS3XXX_PCIE1_CFG1_BASE),
|
||||
.length = SZ_16M,
|
||||
.type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_PCIE0_IO_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_PCIE0_IO_BASE),
|
||||
+ .length = SZ_16M,
|
||||
+ .type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_PCIE1_IO_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_PCIE1_IO_BASE),
|
||||
+ .length = SZ_16M,
|
||||
+ .type = MT_DEVICE,
|
||||
#endif
|
||||
},
|
||||
};
|
109
target/linux/cns3xxx/patches-4.19/060-pcie_abort.patch
Normal file
109
target/linux/cns3xxx/patches-4.19/060-pcie_abort.patch
Normal file
@ -0,0 +1,109 @@
|
||||
--- a/arch/arm/mach-cns3xxx/pcie.c
|
||||
+++ b/arch/arm/mach-cns3xxx/pcie.c
|
||||
@@ -86,6 +86,79 @@ static void __iomem *cns3xxx_pci_map_bus
|
||||
return base + where + (devfn << 12);
|
||||
}
|
||||
|
||||
+static inline int check_master_abort(struct pci_bus *bus, unsigned int devfn, int where)
|
||||
+{
|
||||
+ struct cns3xxx_pcie *cnspci = pbus_to_cnspci(bus);
|
||||
+
|
||||
+ /* check PCI-compatible status register after access */
|
||||
+ if (cnspci->linked) {
|
||||
+ void __iomem *host_base;
|
||||
+ u32 sreg, ereg;
|
||||
+
|
||||
+ host_base = (void __iomem *) cnspci->cfg_bases[CNS3XXX_HOST_TYPE].virtual;
|
||||
+ sreg = __raw_readw(host_base + 0x6) & 0xF900;
|
||||
+ ereg = __raw_readl(host_base + 0x104); // Uncorrectable Error Status Reg
|
||||
+
|
||||
+ if (sreg | ereg) {
|
||||
+ /* SREG:
|
||||
+ * BIT15 - Detected Parity Error
|
||||
+ * BIT14 - Signaled System Error
|
||||
+ * BIT13 - Received Master Abort
|
||||
+ * BIT12 - Received Target Abort
|
||||
+ * BIT11 - Signaled Target Abort
|
||||
+ * BIT08 - Master Data Parity Error
|
||||
+ *
|
||||
+ * EREG:
|
||||
+ * BIT20 - Unsupported Request
|
||||
+ * BIT19 - ECRC
|
||||
+ * BIT18 - Malformed TLP
|
||||
+ * BIT17 - Receiver Overflow
|
||||
+ * BIT16 - Unexpected Completion
|
||||
+ * BIT15 - Completer Abort
|
||||
+ * BIT14 - Completion Timeout
|
||||
+ * BIT13 - Flow Control Protocol Error
|
||||
+ * BIT12 - Poisoned TLP
|
||||
+ * BIT04 - Data Link Protocol Error
|
||||
+ *
|
||||
+ * TODO: see Documentation/pci-error-recovery.txt
|
||||
+ * implement error_detected handler
|
||||
+ */
|
||||
+/*
|
||||
+ printk("pci error: %04d:%02x:%02x.%02x sreg=0x%04x ereg=0x%08x", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), sreg, ereg);
|
||||
+ if (sreg & BIT(15)) printk(" <PERR");
|
||||
+ if (sreg & BIT(14)) printk(" >SERR");
|
||||
+ if (sreg & BIT(13)) printk(" <MABRT");
|
||||
+ if (sreg & BIT(12)) printk(" <TABRT");
|
||||
+ if (sreg & BIT(11)) printk(" >TABRT");
|
||||
+ if (sreg & BIT( 8)) printk(" MPERR");
|
||||
+
|
||||
+ if (ereg & BIT(20)) printk(" Unsup");
|
||||
+ if (ereg & BIT(19)) printk(" ECRC");
|
||||
+ if (ereg & BIT(18)) printk(" MTLP");
|
||||
+ if (ereg & BIT(17)) printk(" OFLOW");
|
||||
+ if (ereg & BIT(16)) printk(" Unex");
|
||||
+ if (ereg & BIT(15)) printk(" ABRT");
|
||||
+ if (ereg & BIT(14)) printk(" COMPTO");
|
||||
+ if (ereg & BIT(13)) printk(" FLOW");
|
||||
+ if (ereg & BIT(12)) printk(" PTLP");
|
||||
+ if (ereg & BIT( 4)) printk(" DLINK");
|
||||
+ printk("\n");
|
||||
+*/
|
||||
+ pr_debug("%s failed port%d sreg=0x%04x\n", __func__,
|
||||
+ pci_domain_nr(bus), sreg);
|
||||
+
|
||||
+ /* make sure the status bits are reset */
|
||||
+ __raw_writew(sreg, host_base + 6);
|
||||
+ __raw_writel(ereg, host_base + 0x104);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
|
||||
int where, int size, u32 *val)
|
||||
{
|
||||
@@ -95,6 +168,11 @@ static int cns3xxx_pci_read_config(struc
|
||||
|
||||
ret = pci_generic_config_read(bus, devfn, where, size, val);
|
||||
|
||||
+ if (check_master_abort(bus, devfn, where)) {
|
||||
+ printk(KERN_ERR "pci error: %04d:%02x:%02x.%02x %02x(%d)= master_abort on read\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, size);
|
||||
+ return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
+ }
|
||||
+
|
||||
if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn &&
|
||||
(where & 0xffc) == PCI_CLASS_REVISION)
|
||||
/*
|
||||
@@ -257,8 +335,14 @@ static void __init cns3xxx_pcie_hw_init(
|
||||
static int cns3xxx_pcie_abort_handler(unsigned long addr, unsigned int fsr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
+#if 0
|
||||
+/* R14_ABORT = PC+4 for XSCALE but not ARM11MPCORE
|
||||
+ * ignore imprecise aborts and use PCI-compatible Status register to
|
||||
+ * determine errors instead
|
||||
+ */
|
||||
if (fsr & (1 << 10))
|
||||
regs->ARM_pc += 4;
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/arch/arm/mach-cns3xxx/pcie.c
|
||||
+++ b/arch/arm/mach-cns3xxx/pcie.c
|
||||
@@ -366,6 +366,8 @@ void __init cns3xxx_pcie_init_late(void)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cns3xxx_pcie); i++) {
|
||||
cns3xxx_pcie_check_link(&cns3xxx_pcie[i]);
|
||||
+ if (!cns3xxx_pcie[i].linked)
|
||||
+ continue;
|
||||
cns3xxx_pcie_hw_init(&cns3xxx_pcie[i]);
|
||||
private_data = &cns3xxx_pcie[i];
|
||||
pci_common_init(&hw_pci);
|
31
target/linux/cns3xxx/patches-4.19/070-i2c_support.patch
Normal file
31
target/linux/cns3xxx/patches-4.19/070-i2c_support.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- a/drivers/i2c/busses/Kconfig
|
||||
+++ b/drivers/i2c/busses/Kconfig
|
||||
@@ -458,6 +458,18 @@ config I2C_CBUS_GPIO
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called i2c-cbus-gpio.
|
||||
|
||||
+config I2C_CNS3XXX
|
||||
+ tristate "Cavium CNS3xxx I2C driver"
|
||||
+ depends on ARCH_CNS3XXX
|
||||
+ help
|
||||
+ Support for Cavium CNS3xxx I2C controller driver.
|
||||
+
|
||||
+ This driver can also be built as a module. If so, the module
|
||||
+ will be called i2c-cns3xxx.
|
||||
+
|
||||
+ Please note that this driver might be needed to bring up other
|
||||
+ devices such as Cavium CNS3xxx Ethernet.
|
||||
+
|
||||
config I2C_CPM
|
||||
tristate "Freescale CPM1 or CPM2 (MPC8xx/826x)"
|
||||
depends on CPM1 || CPM2
|
||||
--- a/drivers/i2c/busses/Makefile
|
||||
+++ b/drivers/i2c/busses/Makefile
|
||||
@@ -131,6 +131,7 @@ obj-$(CONFIG_I2C_VIPERBOARD) += i2c-vipe
|
||||
obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o
|
||||
obj-$(CONFIG_I2C_BCM_KONA) += i2c-bcm-kona.o
|
||||
obj-$(CONFIG_I2C_BRCMSTB) += i2c-brcmstb.o
|
||||
+obj-$(CONFIG_I2C_CNS3XXX) += i2c-cns3xxx.o
|
||||
obj-$(CONFIG_I2C_CROS_EC_TUNNEL) += i2c-cros-ec-tunnel.o
|
||||
obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
|
||||
obj-$(CONFIG_I2C_MLXCPLD) += i2c-mlxcpld.o
|
51
target/linux/cns3xxx/patches-4.19/075-spi_support.patch
Normal file
51
target/linux/cns3xxx/patches-4.19/075-spi_support.patch
Normal file
@ -0,0 +1,51 @@
|
||||
--- a/drivers/spi/Kconfig
|
||||
+++ b/drivers/spi/Kconfig
|
||||
@@ -181,6 +181,13 @@ config SPI_CLPS711X
|
||||
This enables dedicated general purpose SPI/Microwire1-compatible
|
||||
master mode interface (SSI1) for CLPS711X-based CPUs.
|
||||
|
||||
+config SPI_CNS3XXX
|
||||
+ tristate "CNS3XXX SPI controller"
|
||||
+ depends on ARCH_CNS3XXX && SPI_MASTER
|
||||
+ select SPI_BITBANG
|
||||
+ help
|
||||
+ This enables using the CNS3XXX SPI controller in master mode.
|
||||
+
|
||||
config SPI_COLDFIRE_QSPI
|
||||
tristate "Freescale Coldfire QSPI controller"
|
||||
depends on (M520x || M523x || M5249 || M525x || M527x || M528x || M532x)
|
||||
--- a/drivers/spi/Makefile
|
||||
+++ b/drivers/spi/Makefile
|
||||
@@ -28,6 +28,7 @@ obj-$(CONFIG_SPI_BITBANG) += spi-bitban
|
||||
obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o
|
||||
obj-$(CONFIG_SPI_CADENCE) += spi-cadence.o
|
||||
obj-$(CONFIG_SPI_CLPS711X) += spi-clps711x.o
|
||||
+obj-$(CONFIG_SPI_CNS3XXX) += spi-cns3xxx.o
|
||||
obj-$(CONFIG_SPI_COLDFIRE_QSPI) += spi-coldfire-qspi.o
|
||||
obj-$(CONFIG_SPI_DAVINCI) += spi-davinci.o
|
||||
obj-$(CONFIG_SPI_DLN2) += spi-dln2.o
|
||||
--- a/include/linux/spi/spi.h
|
||||
+++ b/include/linux/spi/spi.h
|
||||
@@ -795,6 +795,10 @@ struct spi_transfer {
|
||||
u32 speed_hz;
|
||||
|
||||
struct list_head transfer_list;
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_CNS3XXX
|
||||
+ unsigned last_in_message_list;
|
||||
+#endif
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/drivers/spi/spi.c
|
||||
+++ b/drivers/spi/spi.c
|
||||
@@ -1018,6 +1018,9 @@ static int spi_transfer_one_message(stru
|
||||
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
||||
trace_spi_transfer_start(msg, xfer);
|
||||
|
||||
+ xfer->last_in_message_list =
|
||||
+ list_is_last(&xfer->transfer_list, &msg->transfers);
|
||||
+
|
||||
spi_statistics_add_transfer_stats(statm, xfer, ctlr);
|
||||
spi_statistics_add_transfer_stats(stats, xfer, ctlr);
|
||||
|
26
target/linux/cns3xxx/patches-4.19/080-sata_support.patch
Normal file
26
target/linux/cns3xxx/patches-4.19/080-sata_support.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- a/drivers/ata/ahci_platform.c
|
||||
+++ b/drivers/ata/ahci_platform.c
|
||||
@@ -37,12 +37,23 @@ static struct scsi_host_template ahci_pl
|
||||
AHCI_SHT(DRV_NAME),
|
||||
};
|
||||
|
||||
+static const struct ata_port_info cns3xxx_port_info = {
|
||||
+ .flags = AHCI_FLAG_COMMON,
|
||||
+ .pio_mask = ATA_PIO4,
|
||||
+ .udma_mask = ATA_UDMA6,
|
||||
+ .port_ops = &ahci_pmp_retry_srst_ops,
|
||||
+};
|
||||
+
|
||||
static int ahci_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct ahci_host_priv *hpriv;
|
||||
+ const struct ata_port_info *info = &ahci_port_info;
|
||||
int rc;
|
||||
|
||||
+ if (IS_ENABLED(CONFIG_ARCH_CNS3XXX))
|
||||
+ info = &cns3xxx_port_info;
|
||||
+
|
||||
hpriv = ahci_platform_get_resources(pdev,
|
||||
AHCI_PLATFORM_GET_RESETS);
|
||||
if (IS_ERR(hpriv))
|
105
target/linux/cns3xxx/patches-4.19/090-timers.patch
Normal file
105
target/linux/cns3xxx/patches-4.19/090-timers.patch
Normal file
@ -0,0 +1,105 @@
|
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -138,6 +138,7 @@ static int cns3xxx_set_oneshot(struct cl
|
||||
|
||||
/* period set, and timer enabled in 'next_event' hook */
|
||||
ctrl |= (1 << 2) | (1 << 9);
|
||||
+ writel(0, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
|
||||
writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
return 0;
|
||||
}
|
||||
@@ -148,7 +149,7 @@ static int cns3xxx_set_periodic(struct c
|
||||
int pclk = cns3xxx_cpu_clock() / 8;
|
||||
int reload;
|
||||
|
||||
- reload = pclk * 20 / (3 * HZ) * 0x25000;
|
||||
+ reload = pclk * 1000000 / HZ;
|
||||
writel(reload, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
|
||||
ctrl |= (1 << 0) | (1 << 2) | (1 << 9);
|
||||
writel(ctrl, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
@@ -175,8 +176,8 @@ static struct clock_event_device cns3xxx
|
||||
.set_state_oneshot = cns3xxx_set_oneshot,
|
||||
.tick_resume = cns3xxx_shutdown,
|
||||
.set_next_event = cns3xxx_timer_set_next_event,
|
||||
- .rating = 350,
|
||||
- .cpumask = cpu_all_mask,
|
||||
+ .rating = 300,
|
||||
+ .cpumask = cpu_possible_mask,
|
||||
};
|
||||
|
||||
static void __init cns3xxx_clockevents_init(unsigned int timer_irq)
|
||||
@@ -220,6 +221,32 @@ static void __init cns3xxx_init_twd(void
|
||||
twd_local_timer_register(&cns3xx_twd_local_timer);
|
||||
}
|
||||
|
||||
+static u64 cns3xxx_get_cycles(struct clocksource *cs)
|
||||
+{
|
||||
+ u64 val;
|
||||
+
|
||||
+ val = readl(cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET);
|
||||
+ val &= 0xffff;
|
||||
+
|
||||
+ return ((val << 32) | readl(cns3xxx_tmr1 + TIMER_FREERUN_OFFSET));
|
||||
+}
|
||||
+
|
||||
+static struct clocksource clocksource_cns3xxx = {
|
||||
+ .name = "freerun",
|
||||
+ .rating = 200,
|
||||
+ .read = cns3xxx_get_cycles,
|
||||
+ .mask = CLOCKSOURCE_MASK(48),
|
||||
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
+};
|
||||
+
|
||||
+static void __init cns3xxx_clocksource_init(void)
|
||||
+{
|
||||
+ /* Reset the FreeRunning counter */
|
||||
+ writel((1 << 16), cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET);
|
||||
+
|
||||
+ clocksource_register_khz(&clocksource_cns3xxx, 100);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Set up the clock source and clock events devices
|
||||
*/
|
||||
@@ -237,13 +264,12 @@ static void __init __cns3xxx_timer_init(
|
||||
/* stop free running timer3 */
|
||||
writel(0, cns3xxx_tmr1 + TIMER_FREERUN_CONTROL_OFFSET);
|
||||
|
||||
- /* timer1 */
|
||||
- writel(0x5C800, cns3xxx_tmr1 + TIMER1_COUNTER_OFFSET);
|
||||
- writel(0x5C800, cns3xxx_tmr1 + TIMER1_AUTO_RELOAD_OFFSET);
|
||||
-
|
||||
writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V1_OFFSET);
|
||||
writel(0, cns3xxx_tmr1 + TIMER1_MATCH_V2_OFFSET);
|
||||
|
||||
+ val = (cns3xxx_cpu_clock() >> 3) * 1000000 / HZ;
|
||||
+ writel(val, cns3xxx_tmr1 + TIMER1_COUNTER_OFFSET);
|
||||
+
|
||||
/* mask irq, non-mask timer1 overflow */
|
||||
irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
|
||||
irq_mask &= ~(1 << 2);
|
||||
@@ -255,23 +281,9 @@ static void __init __cns3xxx_timer_init(
|
||||
val |= (1 << 9);
|
||||
writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
|
||||
- /* timer2 */
|
||||
- writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V1_OFFSET);
|
||||
- writel(0, cns3xxx_tmr1 + TIMER2_MATCH_V2_OFFSET);
|
||||
-
|
||||
- /* mask irq */
|
||||
- irq_mask = readl(cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
|
||||
- irq_mask |= ((1 << 3) | (1 << 4) | (1 << 5));
|
||||
- writel(irq_mask, cns3xxx_tmr1 + TIMER1_2_INTERRUPT_MASK_OFFSET);
|
||||
-
|
||||
- /* down counter */
|
||||
- val = readl(cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
- val |= (1 << 10);
|
||||
- writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
|
||||
-
|
||||
- /* Make irqs happen for the system timer */
|
||||
setup_irq(timer_irq, &cns3xxx_timer_irq);
|
||||
|
||||
+ cns3xxx_clocksource_init();
|
||||
cns3xxx_clockevents_init(timer_irq);
|
||||
cns3xxx_init_twd();
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
--- a/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
@@ -162,11 +162,13 @@
|
||||
#define CNS3XXX_L2C_BASE 0x92000000 /* L2 Cache Control */
|
||||
|
||||
#define CNS3XXX_PCIE0_MEM_BASE 0xA0000000 /* PCIe Port 0 IO/Memory Space */
|
||||
+#define CNS3XXX_PCIE0_MEM_BASE_VIRT 0xE0000000
|
||||
|
||||
#define CNS3XXX_PCIE0_HOST_BASE 0xAB000000 /* PCIe Port 0 RC Base */
|
||||
#define CNS3XXX_PCIE0_HOST_BASE_VIRT 0xE1000000
|
||||
|
||||
#define CNS3XXX_PCIE0_IO_BASE 0xAC000000 /* PCIe Port 0 */
|
||||
+#define CNS3XXX_PCIE0_IO_BASE_VIRT 0xE2000000
|
||||
|
||||
#define CNS3XXX_PCIE0_CFG0_BASE 0xAD000000 /* PCIe Port 0 CFG Type 0 */
|
||||
#define CNS3XXX_PCIE0_CFG0_BASE_VIRT 0xE3000000
|
||||
@@ -175,13 +177,16 @@
|
||||
#define CNS3XXX_PCIE0_CFG1_BASE_VIRT 0xE4000000
|
||||
|
||||
#define CNS3XXX_PCIE0_MSG_BASE 0xAF000000 /* PCIe Port 0 Message Space */
|
||||
+#define CNS3XXX_PCIE0_MSG_BASE_VIRT 0xE5000000
|
||||
|
||||
#define CNS3XXX_PCIE1_MEM_BASE 0xB0000000 /* PCIe Port 1 IO/Memory Space */
|
||||
+#define CNS3XXX_PCIE1_MEM_BASE_VIRT 0xE8000000
|
||||
|
||||
#define CNS3XXX_PCIE1_HOST_BASE 0xBB000000 /* PCIe Port 1 RC Base */
|
||||
#define CNS3XXX_PCIE1_HOST_BASE_VIRT 0xE9000000
|
||||
|
||||
#define CNS3XXX_PCIE1_IO_BASE 0xBC000000 /* PCIe Port 1 */
|
||||
+#define CNS3XXX_PCIE1_IO_BASE_VIRT 0xEA000000
|
||||
|
||||
#define CNS3XXX_PCIE1_CFG0_BASE 0xBD000000 /* PCIe Port 1 CFG Type 0 */
|
||||
#define CNS3XXX_PCIE1_CFG0_BASE_VIRT 0xEB000000
|
||||
@@ -190,6 +195,7 @@
|
||||
#define CNS3XXX_PCIE1_CFG1_BASE_VIRT 0xEC000000
|
||||
|
||||
#define CNS3XXX_PCIE1_MSG_BASE 0xBF000000 /* PCIe Port 1 Message Space */
|
||||
+#define CNS3XXX_PCIE1_MSG_BASE_VIRT 0xED000000
|
||||
|
||||
/*
|
||||
* Testchip peripheral and fpga gic regions
|
67
target/linux/cns3xxx/patches-4.19/095-gpio_support.patch
Normal file
67
target/linux/cns3xxx/patches-4.19/095-gpio_support.patch
Normal file
@ -0,0 +1,67 @@
|
||||
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
@@ -223,6 +223,10 @@ static void __init cns3420_init(void)
|
||||
|
||||
cns3xxx_ahci_init();
|
||||
cns3xxx_sdhci_init();
|
||||
+ cns3xxx_gpio_init( 0, 32, CNS3XXX_GPIOA_BASE_VIRT, IRQ_CNS3XXX_GPIOA,
|
||||
+ NR_IRQS_CNS3XXX);
|
||||
+ cns3xxx_gpio_init(32, 32, CNS3XXX_GPIOB_BASE_VIRT, IRQ_CNS3XXX_GPIOB,
|
||||
+ NR_IRQS_CNS3XXX + 32);
|
||||
|
||||
pm_power_off = cns3xxx_power_off;
|
||||
}
|
||||
--- a/arch/arm/mach-cns3xxx/Kconfig
|
||||
+++ b/arch/arm/mach-cns3xxx/Kconfig
|
||||
@@ -3,6 +3,8 @@ menuconfig ARCH_CNS3XXX
|
||||
bool "Cavium Networks CNS3XXX family"
|
||||
depends on ARCH_MULTI_V6
|
||||
select ARM_GIC
|
||||
+ select ARCH_REQUIRE_GPIOLIB
|
||||
+ select GENERIC_IRQ_CHIP
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_ARM_TWD
|
||||
select HAVE_SMP
|
||||
--- a/arch/arm/mach-cns3xxx/Makefile
|
||||
+++ b/arch/arm/mach-cns3xxx/Makefile
|
||||
@@ -2,7 +2,7 @@
|
||||
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
|
||||
|
||||
obj-$(CONFIG_ARCH_CNS3XXX) += cns3xxx.o
|
||||
-cns3xxx-y += core.o pm.o
|
||||
+cns3xxx-y += core.o pm.o gpio.o
|
||||
cns3xxx-$(CONFIG_ATAGS) += devices.o
|
||||
cns3xxx-$(CONFIG_PCI) += pcie.o
|
||||
cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
|
||||
--- a/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3xxx.h
|
||||
@@ -68,8 +68,10 @@
|
||||
#define SMC_PCELL_ID_3_OFFSET 0xFFC
|
||||
|
||||
#define CNS3XXX_GPIOA_BASE 0x74000000 /* GPIO port A */
|
||||
+#define CNS3XXX_GPIOA_BASE_VIRT 0xFB006000
|
||||
|
||||
#define CNS3XXX_GPIOB_BASE 0x74800000 /* GPIO port B */
|
||||
+#define CNS3XXX_GPIOB_BASE_VIRT 0xFB007000
|
||||
|
||||
#define CNS3XXX_RTC_BASE 0x75000000 /* Real Time Clock */
|
||||
|
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -50,6 +50,16 @@ static struct map_desc cns3xxx_io_desc[]
|
||||
.pfn = __phys_to_pfn(CNS3XXX_PM_BASE),
|
||||
.length = SZ_4K,
|
||||
.type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_GPIOA_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_GPIOA_BASE),
|
||||
+ .length = SZ_4K,
|
||||
+ .type = MT_DEVICE,
|
||||
+ }, {
|
||||
+ .virtual = CNS3XXX_GPIOB_BASE_VIRT,
|
||||
+ .pfn = __phys_to_pfn(CNS3XXX_GPIOB_BASE),
|
||||
+ .length = SZ_4K,
|
||||
+ .type = MT_DEVICE,
|
||||
#ifdef CONFIG_PCI
|
||||
}, {
|
||||
.virtual = CNS3XXX_PCIE0_HOST_BASE_VIRT,
|
@ -0,0 +1,69 @@
|
||||
--- a/arch/arm/mach-cns3xxx/core.c
|
||||
+++ b/arch/arm/mach-cns3xxx/core.c
|
||||
@@ -307,13 +307,26 @@ void __init cns3xxx_timer_init(void)
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
|
||||
-void __init cns3xxx_l2x0_init(void)
|
||||
+static int cns3xxx_l2x0_enable = 1;
|
||||
+
|
||||
+static int __init cns3xxx_l2x0_disable(char *s)
|
||||
+{
|
||||
+ cns3xxx_l2x0_enable = 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+__setup("nol2x0", cns3xxx_l2x0_disable);
|
||||
+
|
||||
+static int __init cns3xxx_l2x0_init(void)
|
||||
{
|
||||
- void __iomem *base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
|
||||
+ void __iomem *base;
|
||||
u32 val;
|
||||
|
||||
+ if (!cns3xxx_l2x0_enable)
|
||||
+ return 0;
|
||||
+
|
||||
+ base = ioremap(CNS3XXX_L2C_BASE, SZ_4K);
|
||||
if (WARN_ON(!base))
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
/*
|
||||
* Tag RAM Control register
|
||||
@@ -343,7 +356,10 @@ void __init cns3xxx_l2x0_init(void)
|
||||
|
||||
/* 32 KiB, 8-way, parity disable */
|
||||
l2x0_init(base, 0x00500000, 0xfe0f0fff);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
+arch_initcall(cns3xxx_l2x0_init);
|
||||
|
||||
#endif /* CONFIG_CACHE_L2X0 */
|
||||
|
||||
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
|
||||
@@ -217,8 +217,6 @@ static struct platform_device *cns3420_p
|
||||
|
||||
static void __init cns3420_init(void)
|
||||
{
|
||||
- cns3xxx_l2x0_init();
|
||||
-
|
||||
platform_add_devices(cns3420_pdevs, ARRAY_SIZE(cns3420_pdevs));
|
||||
|
||||
cns3xxx_ahci_init();
|
||||
--- a/arch/arm/mach-cns3xxx/core.h
|
||||
+++ b/arch/arm/mach-cns3xxx/core.h
|
||||
@@ -16,12 +16,6 @@
|
||||
extern struct smp_operations cns3xxx_smp_ops;
|
||||
extern void cns3xxx_timer_init(void);
|
||||
|
||||
-#ifdef CONFIG_CACHE_L2X0
|
||||
-void __init cns3xxx_l2x0_init(void);
|
||||
-#else
|
||||
-static inline void cns3xxx_l2x0_init(void) {}
|
||||
-#endif /* CONFIG_CACHE_L2X0 */
|
||||
-
|
||||
#ifdef CONFIG_PCI
|
||||
extern void __init cns3xxx_pcie_init_late(void);
|
||||
#else
|
46
target/linux/cns3xxx/patches-4.19/100-laguna_support.patch
Normal file
46
target/linux/cns3xxx/patches-4.19/100-laguna_support.patch
Normal file
@ -0,0 +1,46 @@
|
||||
--- a/arch/arm/mach-cns3xxx/Kconfig
|
||||
+++ b/arch/arm/mach-cns3xxx/Kconfig
|
||||
@@ -23,4 +23,12 @@ config MACH_CNS3420VB
|
||||
This is a platform with an on-board ARM11 MPCore and has support
|
||||
for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, etc.
|
||||
|
||||
+config MACH_GW2388
|
||||
+ bool "Support for Gateworks Laguna Platform"
|
||||
+ help
|
||||
+ Include support for the Gateworks Laguna Platform
|
||||
+
|
||||
+ This is a platform with an on-board ARM11 MPCore and has support
|
||||
+ for USB, USB-OTG, MMC/SD/SDIO, SATA, PCI-E, I2C, GIG, etc.
|
||||
+
|
||||
endif
|
||||
--- a/arch/arm/mach-cns3xxx/Makefile
|
||||
+++ b/arch/arm/mach-cns3xxx/Makefile
|
||||
@@ -8,3 +8,5 @@ cns3xxx-$(CONFIG_PCI) += pcie.o
|
||||
cns3xxx-$(CONFIG_MACH_CNS3420VB) += cns3420vb.o
|
||||
cns3xxx-$(CONFIG_SMP) += platsmp.o headsmp.o cns3xxx_fiq.o
|
||||
cns3xxx-$(CONFIG_HOTPLUG_CPU) += hotplug.o
|
||||
+cns3xxx-$(CONFIG_MACH_GW2388) += laguna.o
|
||||
+
|
||||
--- a/arch/arm/mach-cns3xxx/devices.c
|
||||
+++ b/arch/arm/mach-cns3xxx/devices.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <asm/mach-types.h>
|
||||
#include "cns3xxx.h"
|
||||
#include "pm.h"
|
||||
#include "core.h"
|
||||
@@ -101,7 +102,11 @@ void __init cns3xxx_sdhci_init(void)
|
||||
u32 gpioa_pins = __raw_readl(gpioa);
|
||||
|
||||
/* MMC/SD pins share with GPIOA */
|
||||
- gpioa_pins |= 0x1fff0004;
|
||||
+ if (machine_is_gw2388()) {
|
||||
+ gpioa_pins |= 0x1fff0000;
|
||||
+ } else {
|
||||
+ gpioa_pins |= 0x1fff0004;
|
||||
+ }
|
||||
__raw_writel(gpioa_pins, gpioa);
|
||||
|
||||
cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
|
@ -0,0 +1,14 @@
|
||||
--- a/drivers/mmc/host/sdhci-cns3xxx.c
|
||||
+++ b/drivers/mmc/host/sdhci-cns3xxx.c
|
||||
@@ -88,9 +88,9 @@ static const struct sdhci_pltfm_data sdh
|
||||
.ops = &sdhci_cns3xxx_ops,
|
||||
.quirks = SDHCI_QUIRK_BROKEN_DMA |
|
||||
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
|
||||
- SDHCI_QUIRK_INVERTED_WRITE_PROTECT |
|
||||
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
|
||||
- SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
|
||||
+ SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
|
||||
+ SDHCI_QUIRK_BROKEN_CARD_DETECTION,
|
||||
};
|
||||
|
||||
static int sdhci_cns3xxx_probe(struct platform_device *pdev)
|
@ -0,0 +1,95 @@
|
||||
--- a/arch/arm/mach-cns3xxx/pcie.c
|
||||
+++ b/arch/arm/mach-cns3xxx/pcie.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/interrupt.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include "cns3xxx.h"
|
||||
@@ -27,7 +28,7 @@ struct cns3xxx_pcie {
|
||||
void __iomem *host_regs; /* PCI config registers for host bridge */
|
||||
void __iomem *cfg0_regs; /* PCI Type 0 config registers */
|
||||
void __iomem *cfg1_regs; /* PCI Type 1 config registers */
|
||||
- unsigned int irqs[2];
|
||||
+ unsigned int irqs[5];
|
||||
struct resource res_io;
|
||||
struct resource res_mem;
|
||||
int port;
|
||||
@@ -95,7 +96,7 @@ static inline int check_master_abort(str
|
||||
void __iomem *host_base;
|
||||
u32 sreg, ereg;
|
||||
|
||||
- host_base = (void __iomem *) cnspci->cfg_bases[CNS3XXX_HOST_TYPE].virtual;
|
||||
+ host_base = (void __iomem *) cnspci->host_regs;
|
||||
sreg = __raw_readw(host_base + 0x6) & 0xF900;
|
||||
ereg = __raw_readl(host_base + 0x104); // Uncorrectable Error Status Reg
|
||||
|
||||
@@ -209,7 +210,7 @@ static struct pci_ops cns3xxx_pcie_ops =
|
||||
static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
||||
{
|
||||
struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev);
|
||||
- int irq = cnspci->irqs[!!dev->bus->number];
|
||||
+ int irq = cnspci->irqs[!!dev->bus->number + pin - 1];
|
||||
|
||||
pr_info("PCIe map irq: %04d:%02x:%02x.%02x slot %d, pin %d, irq: %d\n",
|
||||
pci_domain_nr(dev->bus), dev->bus->number, PCI_SLOT(dev->devfn),
|
||||
@@ -235,7 +236,13 @@ static struct cns3xxx_pcie cns3xxx_pcie[
|
||||
.end = CNS3XXX_PCIE0_HOST_BASE - 1, /* 176 MiB */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
- .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, },
|
||||
+ .irqs = {
|
||||
+ IRQ_CNS3XXX_PCIE0_RC,
|
||||
+ IRQ_CNS3XXX_PCIE0_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE0_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE0_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE0_DEVICE,
|
||||
+ },
|
||||
.port = 0,
|
||||
},
|
||||
[1] = {
|
||||
@@ -254,7 +261,13 @@ static struct cns3xxx_pcie cns3xxx_pcie[
|
||||
.end = CNS3XXX_PCIE1_HOST_BASE - 1, /* 176 MiB */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
- .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, },
|
||||
+ .irqs = {
|
||||
+ IRQ_CNS3XXX_PCIE1_RC,
|
||||
+ IRQ_CNS3XXX_PCIE1_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE1_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE1_DEVICE,
|
||||
+ IRQ_CNS3XXX_PCIE1_DEVICE,
|
||||
+ },
|
||||
.port = 1,
|
||||
},
|
||||
};
|
||||
@@ -346,6 +359,14 @@ static int cns3xxx_pcie_abort_handler(un
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void __init cns3xxx_pcie_set_irqs(int bus, int *irqs)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ cns3xxx_pcie[bus].irqs[i + 1] = irqs[i];
|
||||
+}
|
||||
+
|
||||
void __init cns3xxx_pcie_init_late(void)
|
||||
{
|
||||
int i;
|
||||
--- a/arch/arm/mach-cns3xxx/core.h
|
||||
+++ b/arch/arm/mach-cns3xxx/core.h
|
||||
@@ -18,8 +18,10 @@ extern void cns3xxx_timer_init(void);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
extern void __init cns3xxx_pcie_init_late(void);
|
||||
+extern void __init cns3xxx_pcie_set_irqs(int bus, int *irqs);
|
||||
#else
|
||||
static inline void __init cns3xxx_pcie_init_late(void) {}
|
||||
+static inline void cns3xxx_pcie_set_irqs(int bus, int *irqs) {}
|
||||
#endif
|
||||
|
||||
void __init cns3xxx_map_io(void);
|
@ -0,0 +1,23 @@
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -2619,7 +2619,8 @@ static void pcie_write_mrrs(struct pci_d
|
||||
* In the "safe" case, do not configure the MRRS. There appear to be
|
||||
* issues with setting MRRS to 0 on a number of devices.
|
||||
*/
|
||||
- if (pcie_bus_config != PCIE_BUS_PERFORMANCE)
|
||||
+ if (pcie_bus_config != PCIE_BUS_PERFORMANCE &&
|
||||
+ pcie_bus_config != PCIE_BUS_PEER2PEER)
|
||||
return;
|
||||
|
||||
/*
|
||||
--- a/include/linux/pci.h
|
||||
+++ b/include/linux/pci.h
|
||||
@@ -866,7 +866,7 @@ enum pcie_bus_config_types {
|
||||
PCIE_BUS_DEFAULT, /* Ensure MPS matches upstream bridge */
|
||||
PCIE_BUS_SAFE, /* Use largest MPS boot-time devices support */
|
||||
PCIE_BUS_PERFORMANCE, /* Use MPS and MRRS for best performance */
|
||||
- PCIE_BUS_PEER2PEER, /* Set MPS = 128 for all devices */
|
||||
+ PCIE_BUS_PEER2PEER, /* set MPS and MRSS to 128 for all devices */
|
||||
};
|
||||
|
||||
extern enum pcie_bus_config_types pcie_bus_config;
|
@ -0,0 +1,15 @@
|
||||
--- a/drivers/net/phy/broadcom.c
|
||||
+++ b/drivers/net/phy/broadcom.c
|
||||
@@ -429,7 +429,11 @@ static int bcm5481_config_aneg(struct ph
|
||||
ret = genphy_config_aneg(phydev);
|
||||
|
||||
/* Then we can set up the delay. */
|
||||
- bcm5481x_config(phydev);
|
||||
+ //bcm5481x_config(phydev);
|
||||
+
|
||||
+ phy_write(phydev, 0x18, 0xf1e7);
|
||||
+ phy_write(phydev, 0x1c, 0x8e00);
|
||||
+ phy_write(phydev, 0x1c, 0xa41f);
|
||||
|
||||
if (of_property_read_bool(np, "enet-phy-lane-swap")) {
|
||||
/* Lane Swap - Undocumented register...magic! */
|
63
target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch
Normal file
63
target/linux/cns3xxx/patches-4.19/210-dwc2_defaults.patch
Normal file
@ -0,0 +1,63 @@
|
||||
--- a/drivers/usb/dwc2/params.c
|
||||
+++ b/drivers/usb/dwc2/params.c
|
||||
@@ -151,6 +151,36 @@ static void dwc2_set_stm32f7_hsotg_param
|
||||
p->host_perio_tx_fifo_size = 256;
|
||||
}
|
||||
|
||||
+static void dwc2_set_cns3xxx_params(struct dwc2_hsotg *hsotg)
|
||||
+{
|
||||
+ struct dwc2_core_params *p = &hsotg->params;
|
||||
+
|
||||
+ p->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE; /* non-HNP/non-SRP capable */
|
||||
+ p->host_dma = 1;
|
||||
+ p->dma_desc_enable = 0;
|
||||
+ p->speed = DWC2_SPEED_PARAM_HIGH; /* High Speed */
|
||||
+ p->enable_dynamic_fifo = 1;
|
||||
+ p->en_multiple_tx_fifo = 1;
|
||||
+ p->host_rx_fifo_size = 658; /* 774 DWORDs */
|
||||
+ p->host_nperio_tx_fifo_size = 128; /* 256 DWORDs */
|
||||
+ p->host_perio_tx_fifo_size = 658; /* 512 DWORDs */
|
||||
+ p->max_transfer_size = 65535,
|
||||
+ p->max_packet_count = 511;
|
||||
+ p->host_channels = 16;
|
||||
+ p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI; /* UTMI */
|
||||
+ p->phy_utmi_width = 16; /* 8 bits */
|
||||
+ p->phy_ulpi_ddr = 0; /* Single */
|
||||
+ p->phy_ulpi_ext_vbus = 0;
|
||||
+ p->i2c_enable = 0;
|
||||
+ p->ulpi_fs_ls = 0;
|
||||
+ p->host_support_fs_ls_low_power = 0;
|
||||
+ p->host_ls_low_power_phy_clk = 0; /* 48 MHz */
|
||||
+ p->ts_dline = 0;
|
||||
+ p->reload_ctl = 0;
|
||||
+ p->ahbcfg = 0x10;
|
||||
+ p->uframe_sched = false;
|
||||
+}
|
||||
+
|
||||
const struct of_device_id dwc2_of_match_table[] = {
|
||||
{ .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params },
|
||||
{ .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params },
|
||||
@@ -806,17 +836,23 @@ int dwc2_get_hwparams(struct dwc2_hsotg
|
||||
|
||||
int dwc2_init_params(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
+ /*
|
||||
const struct of_device_id *match;
|
||||
void (*set_params)(void *data);
|
||||
+ */
|
||||
|
||||
dwc2_set_default_params(hsotg);
|
||||
dwc2_get_device_properties(hsotg);
|
||||
|
||||
+ /*
|
||||
match = of_match_device(dwc2_of_match_table, hsotg->dev);
|
||||
if (match && match->data) {
|
||||
set_params = match->data;
|
||||
set_params(hsotg);
|
||||
}
|
||||
+ */
|
||||
+
|
||||
+ dwc2_set_cns3xxx_params(hsotg);
|
||||
|
||||
dwc2_check_params(hsotg);
|
||||
|
@ -94,7 +94,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
/* 32MB of flash */
|
||||
reg = <0x30000000 0x02000000>;
|
||||
|
||||
@@ -242,5 +292,16 @@
|
||||
@@ -238,5 +288,16 @@
|
||||
ata@63000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ the patch is only included in the series for context.
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
@@ -303,5 +303,13 @@
|
||||
@@ -299,5 +299,13 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led-wps {
|
||||
@@ -249,6 +255,47 @@
|
||||
@@ -245,6 +251,47 @@
|
||||
groups = "gpio1bgrp";
|
||||
};
|
||||
};
|
||||
@ -61,7 +61,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
@@ -290,6 +337,18 @@
|
||||
@@ -286,6 +333,18 @@
|
||||
<0x6000 0 0 4 &pci_intc 2>;
|
||||
};
|
||||
|
||||
|
@ -1,66 +0,0 @@
|
||||
From 0f6c4817471faf572b5273cdf90160790b0c3b29 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Thu, 17 May 2018 17:00:10 +0200
|
||||
Subject: [PATCH 07/18] ARM: dts: Fix up the D-Link DIR-685 MTD partition info
|
||||
|
||||
The vendor firmware was analyzed to get the right idea about
|
||||
this flash layout. /proc/mtd contains:
|
||||
|
||||
dev: size erasesize name
|
||||
mtd0: 01e7ff40 00020000 "rootfs"
|
||||
mtd1: 01f40000 00020000 "upgrade"
|
||||
mtd2: 00040000 00020000 "rgdb"
|
||||
mtd3: 00020000 00020000 "nvram"
|
||||
mtd4: 00040000 00020000 "RedBoot"
|
||||
mtd5: 00020000 00020000 "LangPack"
|
||||
mtd6: 02000000 00020000 "flash"
|
||||
|
||||
Here "flash" is obviously the whole device and we know "rootfs"
|
||||
is a bogus hack to point to a squashfs rootfs inside of the main
|
||||
"upgrade partition". We know "RedBoot" is the first 0x40000 of
|
||||
the flash and the "upgrade" partition follows from 0x40000 to
|
||||
0x1f8000. So we have mtd0, 1, 4 and 6 covered.
|
||||
|
||||
Remains:
|
||||
mtd2: 00040000 00020000 "rgdb"
|
||||
mtd3: 00020000 00020000 "nvram"
|
||||
mtd5: 00020000 00020000 "LangPack"
|
||||
|
||||
Inspecting the flash at 0x1f8000 and 0x1fa000 reveals each of
|
||||
these starting with "RGCFG1" so we assume 0x1f8000-1fbfff is
|
||||
"rgdb" of 0x40000.
|
||||
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
arch/arm/boot/dts/gemini-dlink-dir-685.dts | 16 ++++++----------
|
||||
1 file changed, 6 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
+++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
|
||||
@@ -274,20 +274,16 @@
|
||||
read-only;
|
||||
};
|
||||
/*
|
||||
- * Between the boot loader and the rootfs is the kernel
|
||||
- * in a custom Storlink format flashed from the boot
|
||||
- * menu. The rootfs is in squashfs format.
|
||||
+ * This firmware image contains the kernel catenated
|
||||
+ * with the squashfs root filesystem. For some reason
|
||||
+ * this is called "upgrade" on the vendor system.
|
||||
*/
|
||||
- partition@1800c0 {
|
||||
- label = "rootfs";
|
||||
- reg = <0x001800c0 0x01dbff40>;
|
||||
- read-only;
|
||||
- };
|
||||
- partition@1f40000 {
|
||||
+ partition@40000 {
|
||||
label = "upgrade";
|
||||
- reg = <0x01f40000 0x00040000>;
|
||||
+ reg = <0x00040000 0x01f40000>;
|
||||
read-only;
|
||||
};
|
||||
+ /* RGDB, Residental Gateway Database? */
|
||||
partition@1f80000 {
|
||||
label = "rgdb";
|
||||
reg = <0x01f80000 0x00040000>;
|
@ -1,55 +0,0 @@
|
||||
From 649affd04813c43e0a72886517fcfccd63230981 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Mon, 29 Jun 2015 16:53:03 +0200
|
||||
Subject: uapi/if_ether.h: prevent redefinition of struct ethhdr
|
||||
|
||||
Musl provides its own ethhdr struct definition. Add a guard to prevent
|
||||
its definition of the appropriate musl header has already been included.
|
||||
|
||||
glibc does not implement this header, but when glibc will implement this
|
||||
they can just define __UAPI_DEF_ETHHDR 0 to make it work with the
|
||||
kernel.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
include/uapi/linux/if_ether.h | 3 +++
|
||||
include/uapi/linux/libc-compat.h | 6 ++++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/include/uapi/linux/if_ether.h
|
||||
+++ b/include/uapi/linux/if_ether.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#define _UAPI_LINUX_IF_ETHER_H
|
||||
|
||||
#include <linux/types.h>
|
||||
+#include <linux/libc-compat.h>
|
||||
|
||||
/*
|
||||
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
|
||||
@@ -150,11 +151,13 @@
|
||||
* This is an Ethernet frame header.
|
||||
*/
|
||||
|
||||
+#if __UAPI_DEF_ETHHDR
|
||||
struct ethhdr {
|
||||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
||||
__be16 h_proto; /* packet type ID field */
|
||||
} __attribute__((packed));
|
||||
+#endif
|
||||
|
||||
|
||||
#endif /* _UAPI_LINUX_IF_ETHER_H */
|
||||
--- a/include/uapi/linux/libc-compat.h
|
||||
+++ b/include/uapi/linux/libc-compat.h
|
||||
@@ -264,4 +264,10 @@
|
||||
|
||||
#endif /* __GLIBC__ */
|
||||
|
||||
+/* Definitions for if_ether.h */
|
||||
+/* allow libcs like musl to deactivate this, glibc does not implement this. */
|
||||
+#ifndef __UAPI_DEF_ETHHDR
|
||||
+#define __UAPI_DEF_ETHHDR 1
|
||||
+#endif
|
||||
+
|
||||
#endif /* _UAPI_LIBC_COMPAT_H */
|
@ -35,7 +35,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
|
||||
/*
|
||||
* MTD methods which simply translate the effective address and pass through
|
||||
@@ -514,7 +523,7 @@ static struct mtd_part *allocate_partiti
|
||||
@@ -518,7 +527,7 @@ static struct mtd_part *allocate_partiti
|
||||
if (!(slave->mtd.flags & MTD_NO_ERASE))
|
||||
wr_alignment = slave->mtd.erasesize;
|
||||
|
||||
@ -44,7 +44,7 @@ Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
|
||||
remainder = do_div(tmp, wr_alignment);
|
||||
if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
|
||||
/* Doesn't start on a boundary of major erase size */
|
||||
@@ -525,7 +534,7 @@ static struct mtd_part *allocate_partiti
|
||||
@@ -529,7 +538,7 @@ static struct mtd_part *allocate_partiti
|
||||
part->name);
|
||||
}
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
From e9156cd26a495a18706e796f02a81fee41ec14f4 Mon Sep 17 00:00:00 2001
|
||||
From: James Hughes <james.hughes@raspberrypi.org>
|
||||
Date: Wed, 19 Apr 2017 11:13:40 +0100
|
||||
Subject: [PATCH] smsc95xx: Use skb_cow_head to deal with cloned skbs
|
||||
|
||||
The driver was failing to check that the SKB wasn't cloned
|
||||
before adding checksum data.
|
||||
Replace existing handling to extend/copy the header buffer
|
||||
with skb_cow_head.
|
||||
|
||||
Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
|
||||
Acked-by: Eric Dumazet <edumazet@google.com>
|
||||
Acked-by: Woojung Huh <Woojung.Huh@microchip.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/usb/smsc95xx.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -2011,13 +2011,13 @@ static struct sk_buff *smsc95xx_tx_fixup
|
||||
/* We do not advertise SG, so skbs should be already linearized */
|
||||
BUG_ON(skb_shinfo(skb)->nr_frags);
|
||||
|
||||
- if (skb_headroom(skb) < overhead) {
|
||||
- struct sk_buff *skb2 = skb_copy_expand(skb,
|
||||
- overhead, 0, flags);
|
||||
+ /* Make writable and expand header space by overhead if required */
|
||||
+ if (skb_cow_head(skb, overhead)) {
|
||||
+ /* Must deallocate here as returning NULL to indicate error
|
||||
+ * means the skb won't be deallocated in the caller.
|
||||
+ */
|
||||
dev_kfree_skb_any(skb);
|
||||
- skb = skb2;
|
||||
- if (!skb)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
if (csum) {
|
@ -1,38 +0,0 @@
|
||||
From 6bc6895bdd6744e0136eaa4a11fbdb20a7db4e40 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Wed, 19 Apr 2017 09:59:25 -0700
|
||||
Subject: [PATCH] ch9200: use skb_cow_head() to deal with cloned skbs
|
||||
|
||||
We need to ensure there is enough headroom to push extra header,
|
||||
but we also need to check if we are allowed to change headers.
|
||||
|
||||
skb_cow_head() is the proper helper to deal with this.
|
||||
|
||||
Fixes: 4a476bd6d1d9 ("usbnet: New driver for QinHeng CH9200 devices")
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Cc: James Hughes <james.hughes@raspberrypi.org>
|
||||
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/usb/ch9200.c | 9 ++-------
|
||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/usb/ch9200.c
|
||||
+++ b/drivers/net/usb/ch9200.c
|
||||
@@ -254,14 +254,9 @@ static struct sk_buff *ch9200_tx_fixup(s
|
||||
tx_overhead = 0x40;
|
||||
|
||||
len = skb->len;
|
||||
- if (skb_headroom(skb) < tx_overhead) {
|
||||
- struct sk_buff *skb2;
|
||||
-
|
||||
- skb2 = skb_copy_expand(skb, tx_overhead, 0, flags);
|
||||
+ if (skb_cow_head(skb, tx_overhead)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
- skb = skb2;
|
||||
- if (!skb)
|
||||
- return NULL;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
__skb_push(skb, tx_overhead);
|
@ -1,43 +0,0 @@
|
||||
From 39fba7835aacda65284a86e611774cbba71dac20 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Wed, 19 Apr 2017 09:59:26 -0700
|
||||
Subject: [PATCH] kaweth: use skb_cow_head() to deal with cloned skbs
|
||||
|
||||
We can use skb_cow_head() to properly deal with clones,
|
||||
especially the ones coming from TCP stack that allow their head being
|
||||
modified. This avoids a copy.
|
||||
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Cc: James Hughes <james.hughes@raspberrypi.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/usb/kaweth.c | 18 ++++++------------
|
||||
1 file changed, 6 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/drivers/net/usb/kaweth.c
|
||||
+++ b/drivers/net/usb/kaweth.c
|
||||
@@ -803,18 +803,12 @@ static netdev_tx_t kaweth_start_xmit(str
|
||||
}
|
||||
|
||||
/* We now decide whether we can put our special header into the sk_buff */
|
||||
- if (skb_cloned(skb) || skb_headroom(skb) < 2) {
|
||||
- /* no such luck - we make our own */
|
||||
- struct sk_buff *copied_skb;
|
||||
- copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
|
||||
- dev_kfree_skb_irq(skb);
|
||||
- skb = copied_skb;
|
||||
- if (!copied_skb) {
|
||||
- kaweth->stats.tx_errors++;
|
||||
- netif_start_queue(net);
|
||||
- spin_unlock_irq(&kaweth->device_lock);
|
||||
- return NETDEV_TX_OK;
|
||||
- }
|
||||
+ if (skb_cow_head(skb, 2)) {
|
||||
+ kaweth->stats.tx_errors++;
|
||||
+ netif_start_queue(net);
|
||||
+ spin_unlock_irq(&kaweth->device_lock);
|
||||
+ dev_kfree_skb_any(skb);
|
||||
+ return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
private_header = (__le16 *)__skb_push(skb, 2);
|
@ -108,7 +108,7 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
local_irq_restore(flags);
|
||||
return data;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ static void *__napi_alloc_frag(unsigned
|
||||
@@ -393,7 +393,7 @@ static void *__napi_alloc_frag(unsigned
|
||||
{
|
||||
struct napi_alloc_cache *nc = this_cpu_ptr(&napi_alloc_cache);
|
||||
|
||||
@ -117,7 +117,7 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
}
|
||||
|
||||
void *napi_alloc_frag(unsigned int fragsz)
|
||||
@@ -441,7 +441,7 @@ struct sk_buff *__netdev_alloc_skb(struc
|
||||
@@ -445,7 +445,7 @@ struct sk_buff *__netdev_alloc_skb(struc
|
||||
local_irq_save(flags);
|
||||
|
||||
nc = this_cpu_ptr(&netdev_alloc_cache);
|
||||
@ -126,7 +126,7 @@ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
pfmemalloc = nc->pfmemalloc;
|
||||
|
||||
local_irq_restore(flags);
|
||||
@@ -505,7 +505,7 @@ struct sk_buff *__napi_alloc_skb(struct
|
||||
@@ -509,7 +509,7 @@ struct sk_buff *__napi_alloc_skb(struct
|
||||
if (sk_memalloc_socks())
|
||||
gfp_mask |= __GFP_MEMALLOC;
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
From cd4b1e34655d46950c065d9284b596cd8d7b28cd Mon Sep 17 00:00:00 2001
|
||||
From: John Youn <johnyoun@synopsys.com>
|
||||
Date: Thu, 3 Nov 2016 17:55:45 -0700
|
||||
Subject: [PATCH] usb: dwc2: Remove unnecessary kfree
|
||||
|
||||
This shouldn't be freed by the HCD as it is owned by the core and
|
||||
allocated with devm_kzalloc.
|
||||
|
||||
Signed-off-by: John Youn <johnyoun@synopsys.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/dwc2/hcd.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/drivers/usb/dwc2/hcd.c
|
||||
+++ b/drivers/usb/dwc2/hcd.c
|
||||
@@ -5202,7 +5202,6 @@ error3:
|
||||
error2:
|
||||
usb_put_hcd(hcd);
|
||||
error1:
|
||||
- kfree(hsotg->core_params);
|
||||
|
||||
#ifdef CONFIG_USB_DWC2_TRACK_MISSED_SOFS
|
||||
kfree(hsotg->last_frame_num_array);
|
@ -1,323 +0,0 @@
|
||||
From 0bc01df3df7a88258148518eb9ce7f88c16a6106 Mon Sep 17 00:00:00 2001
|
||||
From: Liping Zhang <zlpnobody@gmail.com>
|
||||
Date: Wed, 8 Mar 2017 22:54:18 +0800
|
||||
Subject: netfilter: nf_tables: fix mismatch in big-endian system
|
||||
|
||||
Currently, there are two different methods to store an u16 integer to
|
||||
the u32 data register. For example:
|
||||
u32 *dest = ®s->data[priv->dreg];
|
||||
1. *dest = 0; *(u16 *) dest = val_u16;
|
||||
2. *dest = val_u16;
|
||||
|
||||
For method 1, the u16 value will be stored like this, either in
|
||||
big-endian or little-endian system:
|
||||
0 15 31
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Value | 0 |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
For method 2, in little-endian system, the u16 value will be the same
|
||||
as listed above. But in big-endian system, the u16 value will be stored
|
||||
like this:
|
||||
0 15 31
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| 0 | Value |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
So later we use "memcmp(®s->data[priv->sreg], data, 2);" to do
|
||||
compare in nft_cmp, nft_lookup expr ..., method 2 will get the wrong
|
||||
result in big-endian system, as 0~15 bits will always be zero.
|
||||
|
||||
For the similar reason, when loading an u16 value from the u32 data
|
||||
register, we should use "*(u16 *) sreg;" instead of "(u16)*sreg;",
|
||||
the 2nd method will get the wrong value in the big-endian system.
|
||||
|
||||
So introduce some wrapper functions to store/load an u8 or u16
|
||||
integer to/from the u32 data register, and use them in the right
|
||||
place.
|
||||
|
||||
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
---
|
||||
include/net/netfilter/nf_tables.h | 29 +++++++++++++++++++++++++
|
||||
net/ipv4/netfilter/nft_masq_ipv4.c | 8 +++----
|
||||
net/ipv4/netfilter/nft_redir_ipv4.c | 8 +++----
|
||||
net/ipv6/netfilter/nft_masq_ipv6.c | 8 +++----
|
||||
net/ipv6/netfilter/nft_redir_ipv6.c | 8 +++----
|
||||
net/netfilter/nft_ct.c | 10 ++++-----
|
||||
net/netfilter/nft_meta.c | 42 +++++++++++++++++++------------------
|
||||
net/netfilter/nft_nat.c | 8 +++----
|
||||
8 files changed, 76 insertions(+), 45 deletions(-)
|
||||
|
||||
--- a/include/net/netfilter/nf_tables.h
|
||||
+++ b/include/net/netfilter/nf_tables.h
|
||||
@@ -87,6 +87,35 @@ struct nft_regs {
|
||||
};
|
||||
};
|
||||
|
||||
+/* Store/load an u16 or u8 integer to/from the u32 data register.
|
||||
+ *
|
||||
+ * Note, when using concatenations, register allocation happens at 32-bit
|
||||
+ * level. So for store instruction, pad the rest part with zero to avoid
|
||||
+ * garbage values.
|
||||
+ */
|
||||
+
|
||||
+static inline void nft_reg_store16(u32 *dreg, u16 val)
|
||||
+{
|
||||
+ *dreg = 0;
|
||||
+ *(u16 *)dreg = val;
|
||||
+}
|
||||
+
|
||||
+static inline void nft_reg_store8(u32 *dreg, u8 val)
|
||||
+{
|
||||
+ *dreg = 0;
|
||||
+ *(u8 *)dreg = val;
|
||||
+}
|
||||
+
|
||||
+static inline u16 nft_reg_load16(u32 *sreg)
|
||||
+{
|
||||
+ return *(u16 *)sreg;
|
||||
+}
|
||||
+
|
||||
+static inline u8 nft_reg_load8(u32 *sreg)
|
||||
+{
|
||||
+ return *(u8 *)sreg;
|
||||
+}
|
||||
+
|
||||
static inline void nft_data_copy(u32 *dst, const struct nft_data *src,
|
||||
unsigned int len)
|
||||
{
|
||||
--- a/net/ipv4/netfilter/nft_masq_ipv4.c
|
||||
+++ b/net/ipv4/netfilter/nft_masq_ipv4.c
|
||||
@@ -26,10 +26,10 @@ static void nft_masq_ipv4_eval(const str
|
||||
memset(&range, 0, sizeof(range));
|
||||
range.flags = priv->flags;
|
||||
if (priv->sreg_proto_min) {
|
||||
- range.min_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_min];
|
||||
- range.max_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_max];
|
||||
+ range.min_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_min]);
|
||||
+ range.max_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_max]);
|
||||
}
|
||||
regs->verdict.code = nf_nat_masquerade_ipv4(pkt->skb, pkt->hook,
|
||||
&range, pkt->out);
|
||||
--- a/net/ipv4/netfilter/nft_redir_ipv4.c
|
||||
+++ b/net/ipv4/netfilter/nft_redir_ipv4.c
|
||||
@@ -26,10 +26,10 @@ static void nft_redir_ipv4_eval(const st
|
||||
|
||||
memset(&mr, 0, sizeof(mr));
|
||||
if (priv->sreg_proto_min) {
|
||||
- mr.range[0].min.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_min];
|
||||
- mr.range[0].max.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_max];
|
||||
+ mr.range[0].min.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_min]);
|
||||
+ mr.range[0].max.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_max]);
|
||||
mr.range[0].flags |= NF_NAT_RANGE_PROTO_SPECIFIED;
|
||||
}
|
||||
|
||||
--- a/net/ipv6/netfilter/nft_masq_ipv6.c
|
||||
+++ b/net/ipv6/netfilter/nft_masq_ipv6.c
|
||||
@@ -27,10 +27,10 @@ static void nft_masq_ipv6_eval(const str
|
||||
memset(&range, 0, sizeof(range));
|
||||
range.flags = priv->flags;
|
||||
if (priv->sreg_proto_min) {
|
||||
- range.min_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_min];
|
||||
- range.max_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_max];
|
||||
+ range.min_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_min]);
|
||||
+ range.max_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_max]);
|
||||
}
|
||||
regs->verdict.code = nf_nat_masquerade_ipv6(pkt->skb, &range, pkt->out);
|
||||
}
|
||||
--- a/net/ipv6/netfilter/nft_redir_ipv6.c
|
||||
+++ b/net/ipv6/netfilter/nft_redir_ipv6.c
|
||||
@@ -26,10 +26,10 @@ static void nft_redir_ipv6_eval(const st
|
||||
|
||||
memset(&range, 0, sizeof(range));
|
||||
if (priv->sreg_proto_min) {
|
||||
- range.min_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_min],
|
||||
- range.max_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_max],
|
||||
+ range.min_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_min]);
|
||||
+ range.max_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_max]);
|
||||
range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED;
|
||||
}
|
||||
|
||||
--- a/net/netfilter/nft_ct.c
|
||||
+++ b/net/netfilter/nft_ct.c
|
||||
@@ -77,7 +77,7 @@ static void nft_ct_get_eval(const struct
|
||||
|
||||
switch (priv->key) {
|
||||
case NFT_CT_DIRECTION:
|
||||
- *dest = CTINFO2DIR(ctinfo);
|
||||
+ nft_reg_store8(dest, CTINFO2DIR(ctinfo));
|
||||
return;
|
||||
case NFT_CT_STATUS:
|
||||
*dest = ct->status;
|
||||
@@ -129,10 +129,10 @@ static void nft_ct_get_eval(const struct
|
||||
return;
|
||||
}
|
||||
case NFT_CT_L3PROTOCOL:
|
||||
- *dest = nf_ct_l3num(ct);
|
||||
+ nft_reg_store8(dest, nf_ct_l3num(ct));
|
||||
return;
|
||||
case NFT_CT_PROTOCOL:
|
||||
- *dest = nf_ct_protonum(ct);
|
||||
+ nft_reg_store8(dest, nf_ct_protonum(ct));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
@@ -149,10 +149,10 @@ static void nft_ct_get_eval(const struct
|
||||
nf_ct_l3num(ct) == NFPROTO_IPV4 ? 4 : 16);
|
||||
return;
|
||||
case NFT_CT_PROTO_SRC:
|
||||
- *dest = (__force __u16)tuple->src.u.all;
|
||||
+ nft_reg_store16(dest, (__force u16)tuple->src.u.all);
|
||||
return;
|
||||
case NFT_CT_PROTO_DST:
|
||||
- *dest = (__force __u16)tuple->dst.u.all;
|
||||
+ nft_reg_store16(dest, (__force u16)tuple->dst.u.all);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
--- a/net/netfilter/nft_meta.c
|
||||
+++ b/net/netfilter/nft_meta.c
|
||||
@@ -45,16 +45,15 @@ void nft_meta_get_eval(const struct nft_
|
||||
*dest = skb->len;
|
||||
break;
|
||||
case NFT_META_PROTOCOL:
|
||||
- *dest = 0;
|
||||
- *(__be16 *)dest = skb->protocol;
|
||||
+ nft_reg_store16(dest, (__force u16)skb->protocol);
|
||||
break;
|
||||
case NFT_META_NFPROTO:
|
||||
- *dest = pkt->pf;
|
||||
+ nft_reg_store8(dest, pkt->pf);
|
||||
break;
|
||||
case NFT_META_L4PROTO:
|
||||
if (!pkt->tprot_set)
|
||||
goto err;
|
||||
- *dest = pkt->tprot;
|
||||
+ nft_reg_store8(dest, pkt->tprot);
|
||||
break;
|
||||
case NFT_META_PRIORITY:
|
||||
*dest = skb->priority;
|
||||
@@ -85,14 +84,12 @@ void nft_meta_get_eval(const struct nft_
|
||||
case NFT_META_IIFTYPE:
|
||||
if (in == NULL)
|
||||
goto err;
|
||||
- *dest = 0;
|
||||
- *(u16 *)dest = in->type;
|
||||
+ nft_reg_store16(dest, in->type);
|
||||
break;
|
||||
case NFT_META_OIFTYPE:
|
||||
if (out == NULL)
|
||||
goto err;
|
||||
- *dest = 0;
|
||||
- *(u16 *)dest = out->type;
|
||||
+ nft_reg_store16(dest, out->type);
|
||||
break;
|
||||
case NFT_META_SKUID:
|
||||
sk = skb_to_full_sk(skb);
|
||||
@@ -142,22 +139,22 @@ void nft_meta_get_eval(const struct nft_
|
||||
#endif
|
||||
case NFT_META_PKTTYPE:
|
||||
if (skb->pkt_type != PACKET_LOOPBACK) {
|
||||
- *dest = skb->pkt_type;
|
||||
+ nft_reg_store8(dest, skb->pkt_type);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (pkt->pf) {
|
||||
case NFPROTO_IPV4:
|
||||
if (ipv4_is_multicast(ip_hdr(skb)->daddr))
|
||||
- *dest = PACKET_MULTICAST;
|
||||
+ nft_reg_store8(dest, PACKET_MULTICAST);
|
||||
else
|
||||
- *dest = PACKET_BROADCAST;
|
||||
+ nft_reg_store8(dest, PACKET_BROADCAST);
|
||||
break;
|
||||
case NFPROTO_IPV6:
|
||||
if (ipv6_hdr(skb)->daddr.s6_addr[0] == 0xFF)
|
||||
- *dest = PACKET_MULTICAST;
|
||||
+ nft_reg_store8(dest, PACKET_MULTICAST);
|
||||
else
|
||||
- *dest = PACKET_BROADCAST;
|
||||
+ nft_reg_store8(dest, PACKET_BROADCAST);
|
||||
break;
|
||||
case NFPROTO_NETDEV:
|
||||
switch (skb->protocol) {
|
||||
@@ -171,14 +168,14 @@ void nft_meta_get_eval(const struct nft_
|
||||
goto err;
|
||||
|
||||
if (ipv4_is_multicast(iph->daddr))
|
||||
- *dest = PACKET_MULTICAST;
|
||||
+ nft_reg_store8(dest, PACKET_MULTICAST);
|
||||
else
|
||||
- *dest = PACKET_BROADCAST;
|
||||
+ nft_reg_store8(dest, PACKET_BROADCAST);
|
||||
|
||||
break;
|
||||
}
|
||||
case htons(ETH_P_IPV6):
|
||||
- *dest = PACKET_MULTICAST;
|
||||
+ nft_reg_store8(dest, PACKET_MULTICAST);
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
@@ -233,7 +230,9 @@ void nft_meta_set_eval(const struct nft_
|
||||
{
|
||||
const struct nft_meta *meta = nft_expr_priv(expr);
|
||||
struct sk_buff *skb = pkt->skb;
|
||||
- u32 value = regs->data[meta->sreg];
|
||||
+ u32 *sreg = ®s->data[meta->sreg];
|
||||
+ u32 value = *sreg;
|
||||
+ u8 pkt_type;
|
||||
|
||||
switch (meta->key) {
|
||||
case NFT_META_MARK:
|
||||
@@ -243,9 +242,12 @@ void nft_meta_set_eval(const struct nft_
|
||||
skb->priority = value;
|
||||
break;
|
||||
case NFT_META_PKTTYPE:
|
||||
- if (skb->pkt_type != value &&
|
||||
- skb_pkt_type_ok(value) && skb_pkt_type_ok(skb->pkt_type))
|
||||
- skb->pkt_type = value;
|
||||
+ pkt_type = nft_reg_load8(sreg);
|
||||
+
|
||||
+ if (skb->pkt_type != pkt_type &&
|
||||
+ skb_pkt_type_ok(pkt_type) &&
|
||||
+ skb_pkt_type_ok(skb->pkt_type))
|
||||
+ skb->pkt_type = pkt_type;
|
||||
break;
|
||||
case NFT_META_NFTRACE:
|
||||
skb->nf_trace = !!value;
|
||||
--- a/net/netfilter/nft_nat.c
|
||||
+++ b/net/netfilter/nft_nat.c
|
||||
@@ -65,10 +65,10 @@ static void nft_nat_eval(const struct nf
|
||||
}
|
||||
|
||||
if (priv->sreg_proto_min) {
|
||||
- range.min_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_min];
|
||||
- range.max_proto.all =
|
||||
- *(__be16 *)®s->data[priv->sreg_proto_max];
|
||||
+ range.min_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_min]);
|
||||
+ range.max_proto.all = (__force __be16)nft_reg_load16(
|
||||
+ ®s->data[priv->sreg_proto_max]);
|
||||
range.flags |= NF_NAT_RANGE_PROTO_SPECIFIED;
|
||||
}
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 649affd04813c43e0a72886517fcfccd63230981 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Mon, 29 Jun 2015 16:53:03 +0200
|
||||
Subject: uapi/if_ether.h: prevent redefinition of struct ethhdr
|
||||
|
||||
Musl provides its own ethhdr struct definition. Add a guard to prevent
|
||||
its definition of the appropriate musl header has already been included.
|
||||
|
||||
glibc does not implement this header, but when glibc will implement this
|
||||
they can just define __UAPI_DEF_ETHHDR 0 to make it work with the
|
||||
kernel.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
include/uapi/linux/if_ether.h | 3 +++
|
||||
include/uapi/linux/libc-compat.h | 6 ++++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/include/uapi/linux/if_ether.h
|
||||
+++ b/include/uapi/linux/if_ether.h
|
||||
@@ -22,6 +22,7 @@
|
||||
#define _UAPI_LINUX_IF_ETHER_H
|
||||
|
||||
#include <linux/types.h>
|
||||
+#include <linux/libc-compat.h>
|
||||
|
||||
/*
|
||||
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
|
||||
@@ -139,11 +140,13 @@
|
||||
* This is an Ethernet frame header.
|
||||
*/
|
||||
|
||||
+#if __UAPI_DEF_ETHHDR
|
||||
struct ethhdr {
|
||||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
||||
__be16 h_proto; /* packet type ID field */
|
||||
} __attribute__((packed));
|
||||
+#endif
|
||||
|
||||
|
||||
#endif /* _UAPI_LINUX_IF_ETHER_H */
|
||||
--- a/include/uapi/linux/libc-compat.h
|
||||
+++ b/include/uapi/linux/libc-compat.h
|
||||
@@ -263,4 +263,10 @@
|
||||
|
||||
#endif /* __GLIBC__ */
|
||||
|
||||
+/* Definitions for if_ether.h */
|
||||
+/* allow libcs like musl to deactivate this, glibc does not implement this. */
|
||||
+#ifndef __UAPI_DEF_ETHHDR
|
||||
+#define __UAPI_DEF_ETHHDR 1
|
||||
+#endif
|
||||
+
|
||||
#endif /* _UAPI_LIBC_COMPAT_H */
|
@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
config MODULES_TREE_LOOKUP
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -3006,9 +3006,11 @@ static struct module *setup_load_info(st
|
||||
@@ -3008,9 +3008,11 @@ static struct module *setup_load_info(st
|
||||
|
||||
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
|
||||
{
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
|
||||
modmagic = NULL;
|
||||
|
||||
@@ -3029,6 +3031,7 @@ static int check_modinfo(struct module *
|
||||
@@ -3031,6 +3033,7 @@ static int check_modinfo(struct module *
|
||||
mod->name);
|
||||
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
|
||||
}
|
||||
@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1982,7 +1982,9 @@ static void read_symbols(char *modname)
|
||||
@@ -1984,7 +1984,9 @@ static void read_symbols(char *modname)
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_modversions(mod, &info, sym, symname);
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
if (!is_vmlinux(modname) ||
|
||||
(is_vmlinux(modname) && vmlinux_section_warnings))
|
||||
@@ -2143,8 +2145,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2145,8 +2147,10 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "#include <linux/vermagic.h>\n");
|
||||
buf_printf(b, "#include <linux/compiler.h>\n");
|
||||
buf_printf(b, "\n");
|
||||
@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
|
||||
@@ -2161,8 +2165,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2163,8 +2167,10 @@ static void add_header(struct buffer *b,
|
||||
|
||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
{
|
||||
@ -169,7 +169,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/* Cannot check for assembler */
|
||||
@@ -2175,10 +2181,12 @@ static void add_retpoline(struct buffer
|
||||
@@ -2177,10 +2183,12 @@ static void add_retpoline(struct buffer
|
||||
|
||||
static void add_staging_flag(struct buffer *b, const char *name)
|
||||
{
|
||||
@ -182,7 +182,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2277,11 +2285,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2279,11 +2287,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void write_if_changed(struct buffer *b, const char *fname)
|
||||
@@ -2518,7 +2528,9 @@ int main(int argc, char **argv)
|
||||
@@ -2520,7 +2530,9 @@ int main(int argc, char **argv)
|
||||
add_staging_flag(&buf, mod->name);
|
||||
err |= add_versions(&buf, mod);
|
||||
add_depends(&buf, mod, modules);
|
||||
|
@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -499,6 +500,22 @@ skb_fail:
|
||||
@@ -503,6 +504,22 @@ skb_fail:
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_skb);
|
||||
|
||||
|
@ -114,7 +114,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
config MODULES_TREE_LOOKUP
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -3002,9 +3002,11 @@ static int setup_load_info(struct load_i
|
||||
@@ -3004,9 +3004,11 @@ static int setup_load_info(struct load_i
|
||||
|
||||
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
|
||||
{
|
||||
@ -127,7 +127,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
|
||||
modmagic = NULL;
|
||||
|
||||
@@ -3025,6 +3027,7 @@ static int check_modinfo(struct module *
|
||||
@@ -3027,6 +3029,7 @@ static int check_modinfo(struct module *
|
||||
mod->name);
|
||||
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
|
||||
}
|
||||
@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1969,7 +1969,9 @@ static void read_symbols(const char *mod
|
||||
@@ -1971,7 +1971,9 @@ static void read_symbols(const char *mod
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_modversions(mod, &info, sym, symname);
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
if (!is_vmlinux(modname) || vmlinux_section_warnings)
|
||||
check_sec_ref(mod, modname, &info);
|
||||
@@ -2132,8 +2134,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2134,8 +2136,10 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "BUILD_SALT;\n");
|
||||
buf_printf(b, "\n");
|
||||
@ -158,7 +158,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
|
||||
@@ -2150,8 +2154,10 @@ static void add_header(struct buffer *b,
|
||||
@@ -2152,8 +2156,10 @@ static void add_header(struct buffer *b,
|
||||
|
||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
{
|
||||
@ -169,7 +169,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/* Cannot check for assembler */
|
||||
@@ -2164,8 +2170,10 @@ static void add_retpoline(struct buffer
|
||||
@@ -2166,8 +2172,10 @@ static void add_retpoline(struct buffer
|
||||
|
||||
static void add_staging_flag(struct buffer *b, const char *name)
|
||||
{
|
||||
@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2264,11 +2272,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2266,11 +2274,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
@ -194,7 +194,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void write_if_changed(struct buffer *b, const char *fname)
|
||||
@@ -2505,7 +2515,9 @@ int main(int argc, char **argv)
|
||||
@@ -2507,7 +2517,9 @@ int main(int argc, char **argv)
|
||||
add_staging_flag(&buf, mod->name);
|
||||
err |= add_versions(&buf, mod);
|
||||
add_depends(&buf, mod, modules);
|
||||
|
@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -499,6 +500,22 @@ skb_fail:
|
||||
@@ -503,6 +504,22 @@ skb_fail:
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_skb);
|
||||
|
||||
|
@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1965,7 +1965,9 @@ static void read_symbols(char *modname)
|
||||
@@ -1967,7 +1967,9 @@ static void read_symbols(char *modname)
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_modversions(mod, &info, sym, symname);
|
||||
@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
if (!is_vmlinux(modname) ||
|
||||
(is_vmlinux(modname) && vmlinux_section_warnings))
|
||||
@@ -2109,7 +2111,9 @@ static void add_header(struct buffer *b,
|
||||
@@ -2111,7 +2113,9 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "#include <linux/vermagic.h>\n");
|
||||
buf_printf(b, "#include <linux/compiler.h>\n");
|
||||
buf_printf(b, "\n");
|
||||
@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
|
||||
@@ -2126,24 +2130,30 @@ static void add_header(struct buffer *b,
|
||||
@@ -2128,24 +2132,30 @@ static void add_header(struct buffer *b,
|
||||
|
||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
{
|
||||
@ -188,7 +188,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/* In kernel, this size is defined in linux/module.h;
|
||||
@@ -2247,11 +2257,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2249,11 +2259,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void write_if_changed(struct buffer *b, const char *fname)
|
||||
@@ -2486,7 +2498,9 @@ int main(int argc, char **argv)
|
||||
@@ -2488,7 +2500,9 @@ int main(int argc, char **argv)
|
||||
add_staging_flag(&buf, mod->name);
|
||||
err |= add_versions(&buf, mod);
|
||||
add_depends(&buf, mod, modules);
|
||||
|
@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -529,6 +530,22 @@ skb_fail:
|
||||
@@ -533,6 +534,22 @@ skb_fail:
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_skb);
|
||||
|
||||
|
@ -123,7 +123,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
set_license(mod, get_modinfo(info, "license"));
|
||||
--- a/scripts/mod/modpost.c
|
||||
+++ b/scripts/mod/modpost.c
|
||||
@@ -1758,7 +1758,9 @@ static void read_symbols(char *modname)
|
||||
@@ -1760,7 +1760,9 @@ static void read_symbols(char *modname)
|
||||
symname = remove_dot(info.strtab + sym->st_name);
|
||||
|
||||
handle_modversions(mod, &info, sym, symname);
|
||||
@ -133,7 +133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
if (!is_vmlinux(modname) ||
|
||||
(is_vmlinux(modname) && vmlinux_section_warnings))
|
||||
@@ -1902,7 +1904,9 @@ static void add_header(struct buffer *b,
|
||||
@@ -1904,7 +1906,9 @@ static void add_header(struct buffer *b,
|
||||
buf_printf(b, "#include <linux/vermagic.h>\n");
|
||||
buf_printf(b, "#include <linux/compiler.h>\n");
|
||||
buf_printf(b, "\n");
|
||||
@ -143,7 +143,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
buf_printf(b, "\n");
|
||||
buf_printf(b, "__visible struct module __this_module\n");
|
||||
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
|
||||
@@ -1919,16 +1923,20 @@ static void add_header(struct buffer *b,
|
||||
@@ -1921,16 +1925,20 @@ static void add_header(struct buffer *b,
|
||||
|
||||
static void add_intree_flag(struct buffer *b, int is_intree)
|
||||
{
|
||||
@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2021,11 +2029,13 @@ static void add_depends(struct buffer *b
|
||||
@@ -2023,11 +2031,13 @@ static void add_depends(struct buffer *b
|
||||
|
||||
static void add_srcversion(struct buffer *b, struct module *mod)
|
||||
{
|
||||
@ -178,7 +178,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
static void write_if_changed(struct buffer *b, const char *fname)
|
||||
@@ -2256,7 +2266,9 @@ int main(int argc, char **argv)
|
||||
@@ -2258,7 +2268,9 @@ int main(int argc, char **argv)
|
||||
add_staging_flag(&buf, mod->name);
|
||||
err |= add_versions(&buf, mod);
|
||||
add_depends(&buf, mod, modules);
|
||||
|
@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO@vplace.de>
|
||||
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -6372,7 +6372,7 @@ static void __ref alloc_node_mem_map(str
|
||||
@@ -6393,7 +6393,7 @@ static void __ref alloc_node_mem_map(str
|
||||
mem_map = NODE_DATA(0)->node_mem_map;
|
||||
#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
|
||||
if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
|
||||
|
@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
* the pointer to that structure.
|
||||
@@ -619,6 +623,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
@@ -623,6 +627,7 @@ int mtd_add_partition(struct mtd_info *p
|
||||
mutex_unlock(&mtd_partitions_mutex);
|
||||
|
||||
add_mtd_device(&new->mtd);
|
||||
@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
mtd_add_partition_attrs(new);
|
||||
|
||||
@@ -697,6 +702,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
@@ -701,6 +706,29 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
/*
|
||||
* This function, given a master MTD object and a partition table, creates
|
||||
* and registers slave MTD objects which are bound to the master according to
|
||||
@@ -728,6 +756,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
@@ -732,6 +760,7 @@ int add_mtd_partitions(struct mtd_info *
|
||||
mutex_unlock(&mtd_partitions_mutex);
|
||||
|
||||
add_mtd_device(&slave->mtd);
|
||||
|
@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
/*
|
||||
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
|
||||
@@ -702,6 +706,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
@@ -706,6 +710,36 @@ int mtd_del_partition(struct mtd_info *m
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||
|
||||
@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
|
||||
#else
|
||||
@@ -1037,6 +1071,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
@@ -1041,6 +1075,61 @@ void mtd_part_parser_cleanup(struct mtd_
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
@@ -744,6 +744,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
@@ -748,6 +748,7 @@ run_parsers_by_type(struct mtd_part *sla
|
||||
|
||||
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
|
||||
{
|
||||
@ -18,7 +18,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
}
|
||||
|
||||
static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
|
||||
@@ -753,6 +754,12 @@ static void mtd_partition_split(struct m
|
||||
@@ -757,6 +758,12 @@ static void mtd_partition_split(struct m
|
||||
if (rootfs_found)
|
||||
return;
|
||||
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/mtd/mtdpart.c
|
||||
+++ b/drivers/mtd/mtdpart.c
|
||||
@@ -1150,6 +1150,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
@@ -1154,6 +1154,24 @@ int mtd_is_partition(const struct mtd_in
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mtd_is_partition);
|
||||
|
||||
|
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -535,19 +602,22 @@ static struct mtd_part *allocate_partiti
|
||||
@@ -539,19 +606,22 @@ static struct mtd_part *allocate_partiti
|
||||
remainder = do_div(tmp, wr_alignment);
|
||||
if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
|
||||
/* Doesn't start on a boundary of major erase size */
|
||||
|
@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -3232,6 +3234,7 @@ static int packet_create(struct net *net
|
||||
@@ -3233,6 +3235,7 @@ static int packet_create(struct net *net
|
||||
mutex_init(&po->pg_vec_lock);
|
||||
po->rollover = NULL;
|
||||
po->prot_hook.func = packet_rcv;
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (sock->type == SOCK_PACKET)
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
@@ -3843,6 +3846,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
@@ -3844,6 +3847,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
|
||||
return 0;
|
||||
}
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default:
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
@@ -3895,6 +3908,13 @@ static int packet_getsockopt(struct sock
|
||||
@@ -3896,6 +3909,13 @@ static int packet_getsockopt(struct sock
|
||||
case PACKET_VNET_HDR:
|
||||
val = po->has_vnet_hdr;
|
||||
break;
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
/**
|
||||
* ata_build_rw_tf - Build ATA taskfile for given read/write request
|
||||
* @tf: Target ATA taskfile
|
||||
@@ -5130,6 +5143,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
|
||||
@@ -5131,6 +5144,9 @@ struct ata_queued_cmd *ata_qc_new_init(s
|
||||
if (tag < 0)
|
||||
return NULL;
|
||||
}
|
||||
@ -75,7 +75,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
qc = __ata_qc_from_tag(ap, tag);
|
||||
qc->tag = qc->hw_tag = tag;
|
||||
@@ -6040,6 +6056,9 @@ struct ata_port *ata_port_alloc(struct a
|
||||
@@ -6041,6 +6057,9 @@ struct ata_port *ata_port_alloc(struct a
|
||||
ap->stats.unhandled_irq = 1;
|
||||
ap->stats.idle_irq = 1;
|
||||
#endif
|
||||
@ -85,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
ata_sff_port_init(ap);
|
||||
|
||||
return ap;
|
||||
@@ -6075,6 +6094,12 @@ static void ata_host_release(struct kref
|
||||
@@ -6076,6 +6095,12 @@ static void ata_host_release(struct kref
|
||||
|
||||
kfree(ap->pmp_link);
|
||||
kfree(ap->slave_link);
|
||||
@ -98,7 +98,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
kfree(ap);
|
||||
host->ports[i] = NULL;
|
||||
}
|
||||
@@ -6538,7 +6563,23 @@ int ata_host_register(struct ata_host *h
|
||||
@@ -6539,7 +6564,23 @@ int ata_host_register(struct ata_host *h
|
||||
host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
|
||||
host->ports[i]->local_port_no = i + 1;
|
||||
}
|
||||
|
@ -69,35 +69,3 @@ Origin: other, https://patchwork.kernel.org/patch/10339127/
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
|
||||
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
|
||||
@@ -839,11 +839,24 @@ static int msm_gpio_init(struct msm_pinc
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev), 0, 0, chip->ngpio);
|
||||
- if (ret) {
|
||||
- dev_err(pctrl->dev, "Failed to add pin range\n");
|
||||
- gpiochip_remove(&pctrl->chip);
|
||||
- return ret;
|
||||
+ /*
|
||||
+ * For DeviceTree-supported systems, the gpio core checks the
|
||||
+ * pinctrl's device node for the "gpio-ranges" property.
|
||||
+ * If it is present, it takes care of adding the pin ranges
|
||||
+ * for the driver. In this case the driver can skip ahead.
|
||||
+ *
|
||||
+ * In order to remain compatible with older, existing DeviceTree
|
||||
+ * files which don't set the "gpio-ranges" property or systems that
|
||||
+ * utilize ACPI the driver has to call gpiochip_add_pin_range().
|
||||
+ */
|
||||
+ if (!of_property_read_bool(pctrl->dev->of_node, "gpio-ranges")) {
|
||||
+ ret = gpiochip_add_pin_range(&pctrl->chip,
|
||||
+ dev_name(pctrl->dev), 0, 0, chip->ngpio);
|
||||
+ if (ret) {
|
||||
+ dev_err(pctrl->dev, "Failed to add pin range\n");
|
||||
+ gpiochip_remove(&pctrl->chip);
|
||||
+ return ret;
|
||||
+ }
|
||||
}
|
||||
|
||||
ret = gpiochip_irqchip_add(chip,
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
--- a/drivers/base/power/opp/core.c
|
||||
+++ b/drivers/base/power/opp/core.c
|
||||
@@ -1277,11 +1277,13 @@ struct opp_table *dev_pm_opp_set_regulat
|
||||
@@ -1280,11 +1280,13 @@ struct opp_table *dev_pm_opp_set_regulat
|
||||
if (!opp_table)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
@ -27,7 +27,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
--- a/drivers/base/power/opp/core.c
|
||||
+++ b/drivers/base/power/opp/core.c
|
||||
@@ -1605,6 +1605,83 @@ put_table:
|
||||
@@ -1608,6 +1608,83 @@ put_table:
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
--- a/drivers/base/power/opp/core.c
|
||||
+++ b/drivers/base/power/opp/core.c
|
||||
@@ -1649,6 +1649,7 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
@@ -1652,6 +1652,7 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
struct opp_table *opp_table;
|
||||
struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
|
||||
int r = 0;
|
||||
@ -25,7 +25,7 @@ Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
|
||||
|
||||
/* keep the node allocated */
|
||||
new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL);
|
||||
@@ -1685,6 +1686,10 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
@@ -1688,6 +1689,10 @@ int dev_pm_opp_adjust_voltage(struct dev
|
||||
|
||||
/* plug in new node */
|
||||
new_opp->supplies[0].u_volt = u_volt;
|
||||
|
@ -157,7 +157,7 @@ Signed-off-by: Ajay Kishore <akisho@codeaurora.org>
|
||||
|
||||
/* Update configuration for gpio.
|
||||
* RAW_STATUS_EN is left on for all gpio irqs. Due to the
|
||||
@@ -962,4 +985,3 @@ int msm_pinctrl_remove(struct platform_d
|
||||
@@ -975,4 +998,3 @@ int msm_pinctrl_remove(struct platform_d
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(msm_pinctrl_remove);
|
||||
|
@ -18,7 +18,7 @@
|
||||
uart->capabilities = up->capabilities;
|
||||
--- a/drivers/tty/serial/serial_core.c
|
||||
+++ b/drivers/tty/serial/serial_core.c
|
||||
@@ -2254,6 +2254,7 @@ uart_report_port(struct uart_driver *drv
|
||||
@@ -2260,6 +2260,7 @@ uart_report_port(struct uart_driver *drv
|
||||
snprintf(address, sizeof(address),
|
||||
"I/O 0x%lx offset 0x%x", port->iobase, port->hub6);
|
||||
break;
|
||||
@ -26,7 +26,7 @@
|
||||
case UPIO_MEM:
|
||||
case UPIO_MEM16:
|
||||
case UPIO_MEM32:
|
||||
@@ -2918,6 +2919,7 @@ int uart_match_port(struct uart_port *po
|
||||
@@ -2924,6 +2925,7 @@ int uart_match_port(struct uart_port *po
|
||||
case UPIO_HUB6:
|
||||
return (port1->iobase == port2->iobase) &&
|
||||
(port1->hub6 == port2->hub6);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
/* Get the HEAD */
|
||||
skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node);
|
||||
@@ -1224,6 +1227,10 @@ int pskb_expand_head(struct sk_buff *skb
|
||||
@@ -1228,6 +1231,10 @@ int pskb_expand_head(struct sk_buff *skb
|
||||
if (skb_shared(skb))
|
||||
BUG();
|
||||
|
||||
|
345
target/linux/kirkwood/config-4.19
Normal file
345
target/linux/kirkwood/config-4.19
Normal file
@ -0,0 +1,345 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_ARCH_HAS_PHYS_TO_DMA=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SG_CHAIN=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_CPU_AUTO=y
|
||||
# CONFIG_ARCH_MULTI_V4 is not set
|
||||
# CONFIG_ARCH_MULTI_V4T is not set
|
||||
CONFIG_ARCH_MULTI_V4_V5=y
|
||||
CONFIG_ARCH_MULTI_V5=y
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
|
||||
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARCH_WANT_LIBATA_LEDS=y
|
||||
CONFIG_ARM=y
|
||||
# CONFIG_ARMADA_THERMAL is not set
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
# CONFIG_ARM_KIRKWOOD_CPUIDLE is not set
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=5
|
||||
# CONFIG_ARM_MVEBU_V7_CPUIDLE is not set
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_THUMB is not set
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_ATA_LEDS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_CACHE_FEROCEON_L2=y
|
||||
# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_CPU_32v5=y
|
||||
CONFIG_CPU_ABRT_EV5T=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_CACHE_VIVT=y
|
||||
CONFIG_CPU_COPY_FEROCEON=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FEROCEON=y
|
||||
# CONFIG_CPU_FEROCEON_OLD_ID is not set
|
||||
# CONFIG_CPU_ICACHE_DISABLE is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_PABRT_LEGACY=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_FEROCEON=y
|
||||
CONFIG_CPU_USE_DOMAINS=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_DEV_MARVELL_CESA=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
|
||||
CONFIG_DEBUG_MVEBU_UART0_ALTERNATE=y
|
||||
# CONFIG_DEBUG_MVEBU_UART1_ALTERNATE is not set
|
||||
CONFIG_DEBUG_UART_8250=y
|
||||
# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
|
||||
CONFIG_DEBUG_UART_8250_SHIFT=2
|
||||
# CONFIG_DEBUG_UART_8250_WORD is not set
|
||||
CONFIG_DEBUG_UART_PHYS=0xf1012000
|
||||
CONFIG_DEBUG_UART_VIRT=0xfed12000
|
||||
CONFIG_DEBUG_UNCOMPRESS=y
|
||||
# CONFIG_DEBUG_USER is not set
|
||||
# CONFIG_DLCI is not set
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_DTC=y
|
||||
# CONFIG_EARLY_PRINTK is not set
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_MVEBU=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_OPTPROBES=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_PROC_CPU=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_OMAP=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_MV64XXX=y
|
||||
# CONFIG_I2C_PXA is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KIRKWOOD_CLK=y
|
||||
CONFIG_KIRKWOOD_THERMAL=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_NETXBIG=y
|
||||
CONFIG_LEDS_NS2=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MACH_KIRKWOOD=y
|
||||
CONFIG_MACH_MVEBU_ANY=y
|
||||
CONFIG_MANGLE_BOOTARGS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MIGHT_HAVE_PCI=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_MVSDIO=y
|
||||
# CONFIG_MMC_TIFM_SD is not set
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MTD_CFI is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
# CONFIG_MTD_NAND_MARVELL is not set
|
||||
CONFIG_MTD_NAND_ORION=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
# CONFIG_MTD_UBI_FASTMAP is not set
|
||||
# CONFIG_MTD_UBI_GLUEBI is not set
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MV643XX_ETH=y
|
||||
CONFIG_MVEBU_CLK_COMMON=y
|
||||
CONFIG_MVEBU_MBUS=y
|
||||
CONFIG_MVMDIO=y
|
||||
# CONFIG_MVNETA is not set
|
||||
# CONFIG_MVPP2 is not set
|
||||
CONFIG_MVSW61XX_PHY=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_KUSER_HELPERS=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_BOOTMEM=y
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_ORION_IRQCHIP=y
|
||||
CONFIG_ORION_TIMER=y
|
||||
CONFIG_ORION_WATCHDOG=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
# CONFIG_PCI_V3_SEMI is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_MVEBU_CP110_COMPHY is not set
|
||||
CONFIG_PHY_MVEBU_SATA=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_KIRKWOOD=y
|
||||
CONFIG_PINCTRL_MVEBU=y
|
||||
# CONFIG_PINCTRL_SINGLE is not set
|
||||
CONFIG_PLAT_ORION=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_GPIO=y
|
||||
# CONFIG_POWER_RESET_QNAP is not set
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REFCOUNT_FULL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_MV=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_SATA_MV=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
# CONFIG_SERIAL_MVEBU_UART is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SOC_BUS=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
# CONFIG_SPI_ARMADA_3700 is not set
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_ORION=y
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=999999
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_SRAM_EXEC=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_ORION=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
CONFIG_USB_LED_TRIG=y
|
||||
# CONFIG_USB_ROLE_SWITCH is not set
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WAN=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
30
target/linux/kirkwood/patches-4.19/100-ib62x0.patch
Normal file
30
target/linux/kirkwood/patches-4.19/100-ib62x0.patch
Normal file
@ -0,0 +1,30 @@
|
||||
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
/ {
|
||||
model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
|
||||
- compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
+ compatible = "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
@@ -118,13 +118,13 @@
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "uImage";
|
||||
- reg = <0x0100000 0x600000>;
|
||||
+ label = "second stage u-boot";
|
||||
+ reg = <0x100000 0x200000>;
|
||||
};
|
||||
|
||||
- partition@700000 {
|
||||
- label = "root";
|
||||
- reg = <0x0700000 0xf900000>;
|
||||
+ partition@200000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x200000 0xfe00000>;
|
||||
};
|
||||
|
||||
};
|
50
target/linux/kirkwood/patches-4.19/101-iconnect.patch
Normal file
50
target/linux/kirkwood/patches-4.19/101-iconnect.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
|
||||
@@ -16,8 +16,6 @@
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 earlyprintk";
|
||||
stdout-path = &uart0;
|
||||
- linux,initrd-start = <0x4500040>;
|
||||
- linux,initrd-end = <0x4800000>;
|
||||
};
|
||||
|
||||
ocp@f1000000 {
|
||||
@@ -146,28 +144,23 @@
|
||||
status = "okay";
|
||||
|
||||
partition@0 {
|
||||
- label = "uboot";
|
||||
- reg = <0x0000000 0xc0000>;
|
||||
+ label = "u-boot";
|
||||
+ reg = <0x0000000 0xe0000>;
|
||||
};
|
||||
|
||||
- partition@a0000 {
|
||||
- label = "env";
|
||||
- reg = <0xa0000 0x20000>;
|
||||
+ partition@e0000 {
|
||||
+ label = "u-boot environment";
|
||||
+ reg = <0xe0000 0x100000>;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "zImage";
|
||||
- reg = <0x100000 0x300000>;
|
||||
+ label = "second stage u-boot";
|
||||
+ reg = <0x100000 0x200000>;
|
||||
};
|
||||
|
||||
- partition@540000 {
|
||||
- label = "initrd";
|
||||
- reg = <0x540000 0x300000>;
|
||||
- };
|
||||
-
|
||||
- partition@980000 {
|
||||
- label = "boot";
|
||||
- reg = <0x980000 0x1f400000>;
|
||||
+ partition@200000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0x200000 0x1fe00000>;
|
||||
};
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user