Tag Sculpt 19.07

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCgAGBQJdJGPtAAoJEKckYDQX7Na3/3oP/3fgZKXRiFaSi0IWDX5leBLx
 bkKgqnnS9KRRLSIibOTZSOBE+HfIUb6gOr4Md1sdM9NILIF+R33cwPc8OUL4nsbc
 tefzgNCCtuDUmLTebDWrEE6Hz1ZJwUiXMOE3ACC/9zoMo9/lg1AQreK5QWt/+jDO
 JTH2SofQOeJjfme90qcJo0x/xg9/ARZzQLiPXigtlwWUEP6b0sA0q1wbcMZb4fyG
 14oOJew/9/3ARawvzw18oSCW1hAQyrDnP0Lm9N/i1vi+mcJc7uBFojXeEKe8IudM
 rq+5NRwj7hV2GfiujVb2MbdM6JpFT5dhUP5pyFDjUd5CuDxpAslYqCBRz7OJQNjz
 a28inTbRucbUDeca7jIg6/IUjpqFyRjWDcmh2ChUbJHWddNeh+8N7bJQUguJmlEL
 XrHeiPEGEbkhofZ7cUHUKbxOtpr+YAonyxSwoKCPWa5Co20E2NOl3C8bAuPZzJxI
 ij+PiPwG79dfW+Q24gV6OImzCeUbTcVibo/GodtySapfdTamE8fdEfgfMEjyPzj4
 2doK3Ufk2oN5XRIyThNErcgTj4Cm6zzhvocKt5Rk31d0FbKpDNM+aDwRMLMcCTTf
 lw8yYMjuFtEkGzQ1612VNB5occR4djx1TtG8EYF7aJ8hf+klpprM2/A4Uj4J6WIw
 M64j4W9LbVM5cj9ynL/m
 =ldp5
 -----END PGP SIGNATURE-----

Merge tag 'sculpt-19.07'
This commit is contained in:
Ehmry - 2019-07-09 14:19:04 +02:00
commit dfd0efe2bb
557 changed files with 2896 additions and 4433 deletions

View File

@ -1 +1 @@
2019-06-11 7dc0f622c058db8b66ba583050e5a5a4b1382b31
2019-07-08 1b0e1040842b8f9a8f547f47e1fe8b859383525a

View File

@ -1 +1 @@
2019-06-11 d8780f267342dca75094330e29c0b77a75b71387
2019-07-08 f3bfd189708c82317b021ffdc53ba80128037465

View File

@ -1 +1 @@
2019-06-11 c376d13cad0898a27c13d4b0fa7d237b6437260b
2019-07-08 87f41f86afb0c19e5682e2e2d41ed182f9334ef1

View File

@ -1 +1 @@
2019-06-11 bb7cb7055a0a1082cf262d4b6cc670337a2f04d2
2019-07-08 d370ecc4cb2ce3f370cfaefecbf97a1c05ef3e69

View File

@ -1 +1 @@
2019-06-11 9ef913b141f73f30dec436389c907ef907c5ccca
2019-07-08 075559ecf0b1206c45de3fc7ccd9b6198bd41d41

View File

@ -1 +1 @@
2019-06-11 0f2ffb36e6695f199ac19cd8a26df3565163c7e3
2019-07-08 536625983e4733b833706e59c35591fe5d06020c

View File

@ -1 +1 @@
2019-05-21 9649f5d5574031c45012fef7e2407a62e6c50954
2019-07-08 5f648e24bfed0e532ad659cc87d8cf60a11efe05

View File

@ -1 +1 @@
2019-05-15 f46f1762b82441ee270fafe09103e12c98bfe3a5
2019-07-08 abc6d82ca4a240319850c788f29cde2655eab1d1

View File

@ -1 +1 @@
2019-06-11 18ca1753584efb521a20136039cdc26dd46817d1
2019-07-08 9802c13e6c8e2c677636f691c10329b4352388c8

View File

@ -1 +1 @@
2019-06-11 e5da7a5c8656be96d6579c8927d97b705c93771f
2019-07-08 12c1bf367a425f5af5a3309170d930f7db9493c7

View File

@ -1 +1 @@
2019-06-11 e263a307de24e8b4e1d0f4202ec0e47a13b605b7
2019-07-08 d22f7b395c0fcfa1c746f32e189d45b644891f93

View File

@ -1 +1 @@
2019-06-11 b1c1b6d4af62a5bc633d308e349b1ee00ea8ec51
2019-07-08 c7b0cd5d4ded3e19b53a297062adf53959129317

View File

@ -1 +1 @@
2019-06-11 2ad24c96c37c78658dc6181871eb7ecf4d0f3d5a
2019-07-08 83b2c1ef2ef84902f859801d1f16b9d882bcea9f

View File

@ -1 +1 @@
2019-06-11 bb1bce72f9e6e9d7c65aa54df7e71496d39c6bd9
2019-07-08 9e10a06a0fbbe1e3a0e6edfb392548c7c1c3f1de

View File

@ -1 +1 @@
2019-06-11 432da85c7881b161013a0281040265c1ea6324b7
2019-07-08 37b1396eabb3168735dd8b25b6ef8cdd770c4f81

View File

@ -1 +1 @@
2019-06-11 77fbf7b927f0a9e2c489542bba754c9b46f4e058
2019-07-08 bdcc414a1ab3da17995c7c1772d4c5f7a72fd266

View File

@ -1 +1 @@
2019-06-11 25ffc5a6afe438024de6b254dac9d04eb85b5ee3
2019-07-08 22d39aab23ce0f611ed0b29e6c06b134a2ef6c6f

View File

@ -1 +1 @@
2019-06-11 806b0e368a970ea3bdc30370001f6fc281c3d765
2019-07-08 6b4aa21984a425124dd639dfdcb1472fcad707ac

View File

@ -1 +1 @@
2019-06-11 0a6ab5c860c6b8e72a2190a27ebc080e4f9f167f
2019-07-08 b6dbf7cadfbd5a6a447cfa16861ff5b93a47f4e9

View File

@ -1 +1 @@
2019-06-11 60c474fa26e64bd94e41612c92daac12fbefa246
2019-07-08 9c6fca8b3296f4c43ffb7c861595bc8c339de306

View File

@ -1 +1 @@
2019-06-11 fe5960b2a356b28ad718f9749dadf75994fcd4a1
2019-07-08 d4f12ba2b0227a165eaabc7c1d4e427ba15fc8f2

View File

@ -1 +1 @@
2019-06-11 e7be36930cee14f9bf39b2ce019211a000cf830d
2019-07-08 326adae76d5caefb92b1fcef5d9435823880410f

View File

@ -16,70 +16,49 @@
.global _start
_start:
/****************
** Enable FPU **
****************/
mov x0, #0b11
lsl x0, x0, #20
msr cpacr_el1, x0
/***********************
** Detect CPU number **
***********************/
mrs x0, mpidr_el1
and x0, x0, #0b11111111
cmp x0, #0
bne __endless_sleep
cbz x0, _crt0_fill_bss_zero
wfe
b _start
/***************************
** Zero-fill BSS segment **
***************************/
ldr x0, =_bss_local_start
ldr x1, =_bss_local_end
_crt0_fill_bss_zero:
ldr x0, =_bss_start
ldr x1, =_bss_end
1:
cmp x1, x0
ble 2f
str xzr, [x0]
add x0, x0, #8
b 1b
2:
b.eq _crt0_enable_fpu
str xzr, [x0], #8
b 1b
/************************************
** Jump to high-level entry point **
************************************/
/****************
** Enable FPU **
****************/
ldr x0, =_start_stack /* load stack address into x0 */
msr vbar_el1, x0
_crt0_enable_fpu:
mov x0, #0b11
lsl x0, x0, #20
msr cpacr_el1, x0
/**********************
** Initialize stack **
**********************/
ldr x0, =_crt0_start_stack
mov sp, x0
bl init
__endless_sleep:
wfe
1: b 1b
_bss_local_start:
.quad _bss_start
_bss_local_end:
.quad _bss_end
.p2align 4
.space 0x4000
_start_stack:
.rept 512
nop
.endr
mrs x24, far_el1
mrs x25, ttbr0_el1
mrs x26, ttbr1_el1
mrs x27, elr_el1
mrs x28, esr_el1
1: b 1b
_crt0_start_stack:

View File

@ -133,6 +133,7 @@ unsigned Bootstrap::Platform::enable_mmu()
Cpu::Sctlr_el1::access_t sctlr = Cpu::Sctlr_el1::read();
Cpu::Sctlr_el1::C::set(sctlr, 1);
Cpu::Sctlr_el1::I::set(sctlr, 1);
Cpu::Sctlr_el1::A::set(sctlr, 0);
Cpu::Sctlr_el1::M::set(sctlr, 1);
Cpu::Sctlr_el1::Sa0::set(sctlr, 1);

View File

@ -106,11 +106,12 @@ struct Hw::Arm_64_cpu
);
SYSTEM_REGISTER(64, Sctlr_el1, sctlr_el1,
struct M : Bitfield<0, 1> { };
struct A : Bitfield<1, 1> { };
struct C : Bitfield<2, 1> { };
struct Sa : Bitfield<3, 1> { };
struct Sa0 : Bitfield<4, 1> { };
struct M : Bitfield<0, 1> { };
struct A : Bitfield<1, 1> { };
struct C : Bitfield<2, 1> { };
struct Sa : Bitfield<3, 1> { };
struct Sa0 : Bitfield<4, 1> { };
struct I : Bitfield<12, 1> { };
);
struct Spsr : Genode::Register<64>

View File

@ -1 +1 @@
2019-06-04 f880caa4785e8994a955fd557608cec0e42d64a7
2019-07-08 8fcf0eb1fb129be701e3d8d2a34aca64262d4302

View File

@ -1 +1 @@
2019-06-03 08a12eda7a98bad6b5571a6ca044f77107fe1afd
2019-07-08 3fc7be4c1dfb5cb59cd439e40b7df1406ea8d6b6

View File

@ -1 +1 @@
2019-06-11 0ef13777ddd8b792d75a95e5e28c9b1225724cca
2019-07-08 684d5388c0aae5fc0939b32763a6d50de0e7e602

View File

@ -1 +1 @@
2019-06-11 2e230b1cda3b77f528b2c3b9735d0a17b9748ce0
2019-07-08 33866934b12b625222ee6c67436894a1783abbed

View File

@ -1 +1 @@
2019-06-11 25e1a54377c50183bea5fcf27ec00feaa1a269b5
2019-07-08 0aa2de4d621d936fb8e05bbcb6c96d0b902a4188

View File

@ -1 +1 @@
2019-06-11 83b328073fd0d8e2dbf6682b745883dde1bf4e65
2019-07-08 149f1c45571b81a63a60ebfeb45f1fc91149b8f3

View File

@ -1 +1 @@
2019-06-11 ae61d52d44465a58790d729aceb391f705636e36
2019-07-08 c7d0d1e7cde0dca197348e1b8156e7f5c2724557

View File

@ -1 +1 @@
2019-06-11 4dcd307294fc37044128f343369cf0cb861a307a
2019-07-08 3a54336a4316d8634700c48a8a1ae5b816efd999

View File

@ -66,30 +66,33 @@ void Genode::print_lines(char const *string, size_t len, FUNC const &func)
if (Genode::strcmp(first_line, string, num_indent_chars) == 0)
string += num_indent_chars;
size_t const line_len =
({
size_t i = 0;
for (; i < len; i++) {
if (string[i] == '\0' || string[i] == '\n') {
size_t line_len = 0;
size_t skip_char = 1;
/* the line length is the offset of the last real character + 1 */
i++;
break;
}
}
i;
});
for (; line_len < len; line_len++) {
if (string[line_len] == '\0' || string[line_len] == '\n') {
line_len++;
break;
}
if (line_len == MAX_LINE_LEN) {
skip_char = 0;
break;
}
}
if (!line_len)
break;
/*
* Copy line from (untrusted) caller to local line buffer
*/
char line_buf[MAX_LINE_LEN];
Genode::strncpy(line_buf, string, Genode::min(line_len, sizeof(line_buf)));
/* buffer for sub-string of the input string plus null-termination */
char line_buf[MAX_LINE_LEN + 1];
/* give strncpy one more as it will add the null termination */
Genode::strncpy(line_buf, string, line_len - skip_char + 1);
/* process null-terminated string in buffer */
func(line_buf);
/* move forward to the next sub-string to process */
string += line_len;
len -= line_len;
}

View File

@ -1 +1 @@
2019-06-06-a d11fd5d2fa5a8a8cdbb948a76804ed081def9339
2019-07-08 fd09ad18cdc7950f77557fc7f4fff9b308f44c2f

View File

@ -1 +1 @@
2019-06-05 a482ca84264eb39d59c6e11b9a75eae733ba963c
2019-07-08 37162466a80c5444506b40c8c98cc6ea6de9b47a

View File

@ -1 +1 @@
2019-06-05 fda3309d428323ef734831259f097c471ce2515e
2019-07-08 c1b5f195b754f1375736254664f1d9176c176503

View File

@ -1 +1 @@
2019-06-05 2452e2c07b1780598da5329370968c5453d2cef1
2019-07-08 05c840ba64069e2b11d1b2121491a8b97f3ca855

View File

@ -1 +1 @@
2019-06-05 eb547d1c8d6524d5eb41fe944187d3c5ec43fd92
2019-07-08 2955a95228750490c3325433ee31efcc32c23861

View File

@ -1 +1 @@
2019-06-05 6e87ae91a73761473509dd592eb0c21c72ae16d9
2019-07-08 e3fb3e259cfcdbafb3b63c7b171018fa8f44d072

View File

@ -1 +1 @@
2019-06-05 d0c7d3ad212e8255eab03aa76768805f68f8bacc
2019-07-08 025c967dccef6885448809592edcc99a23c21d6f

View File

@ -1 +1 @@
-
2019-07-08 39cec48c0c94b58168c99cd9dcdf6fc1d5bdd66e

View File

@ -1 +1 @@
-
2019-07-08 0842f66801660cba8cd5efb0402b54710f3de773

View File

@ -1 +1 @@
-
2019-07-08 a30039fc71bcfb8fe05073d5f5348757e1688abc

View File

@ -1 +1 @@
2019-06-05 35e65370ff3ce58be5da7f2fb9c1547996feb5c2
2019-07-08 3062c209b76f74bbfe9f3184e2cf2a4d6f5818c0

View File

@ -1 +1 @@
2019-06-05 876cb96d5a8fc135a41037c937af99fde990526f
2019-07-08 43e741d38647b816fdb6cd5a3b10de3c5be60593

View File

@ -1 +1 @@
2019-06-05 e39464fdbd946414669c8f238ba06993f5c8ec76
2019-07-08 f48c92352a33a8bab503e9edf5af7a0c9c47d686

View File

@ -1 +1 @@
2019-06-05 a5815f580048b6e9508f783938a1f61c81b22c82
2019-07-08 02f5e81d1ecc8db4fb5f5ff78cc1e540124fc45c

View File

@ -1 +1 @@
2019-06-05 9742b8751e31b5098e57133a5b24741cd0c40396
2019-07-08 369710b5565c620340c8d461add233bbbf1478d5

View File

@ -1 +1 @@
2019-06-05 164dbe93285a6101f0f418fb0aa2d6d5c91d639a
2019-07-08 54ce4c79b98693ab03b6979b7dc0c8a6b4082ee3

View File

@ -1 +1 @@
2019-06-04 0e6cd36980016c3ab86e2b90107420c4d9d3caf3
2019-07-08 8183f267957f5c7db338191121336c602eac383c

View File

@ -1 +1 @@
2019-06-04 6e472e63c280ffa9b1175115e0dc98c3cd32d87c
2019-07-08 20762d50e848166cbdf725857347a3ff24683c30

View File

@ -1 +1 @@
2019-06-04 d4fdeb7a430acef195d05f9c8ee836b60a3e055c
2019-07-08 652cdfdd9d1acd167bd7185a6cf616d88a73663f

View File

@ -1 +1 @@
2019-06-04 8ac50ced701d8668e5d2f29cccfc10da1b3ca0b9
2019-07-08 51e4cc7eb75188b0d1fcde1f1b057d92b64d098c

View File

@ -1 +1 @@
2019-06-04 1ccc7b361eabfade36a7a5c9f14d376c86ab6037
2019-07-08 fc002925eda6f7db5206b9cee3a9822aa1cd1f41

View File

@ -1 +1 @@
2019-06-04 8db0ee218510488d127e0c57efbd899dd1a41730
2019-07-08 d72eb842530ff6ed751e2adeaed7de8f0fa83121

View File

@ -1 +1 @@
-
2019-07-08 f91e0412a7431e84c79bc83dced7612f642ed77c

View File

@ -1 +1 @@
-
2019-07-08 367fb9c90705182addcaa2f94b6307dd2aa4ff6c

View File

@ -1 +1 @@
2019-06-05 10ac3bc7fbdf6f4c0a77bae227f6453116e9185d
2019-07-08 9fa40d8b5e824b1768c24feb89bfec1392f01740

View File

@ -1 +1 @@
2019-06-04 b5c282e19522c550f402815eff261c2c4df77b80
2019-07-08 e6bfee3e296112786768f076033e347482f30abd

View File

@ -1 +1 @@
2019-06-04 bbe0406ec40eaecb32005efdc9cbd84981995ea2
2019-07-08 2aa873fc4c12115140bb080f08a2e20ed87cbe08

View File

@ -1 +1 @@
2019-06-04 07923c2b47e960b654dfbc8b5d2544ceaaf4a802
2019-07-08 646ab813d96cc31c9808162daee4f81e7f4bac0d

View File

@ -1 +1 @@
2019-06-05 994b8c82d5915b04f050b4383bbd1fe56df4a2f1
2019-07-08 43d46908341a5dc4481e662a779fdf4bac49aa5b

View File

@ -1 +1 @@
2019-06-05 4bfb6d87ebf9870934643c7f4ba5ba22c7823aea
2019-07-08 b461241206511b752e18b9145556a2a7fae28b6e

View File

@ -1 +1 @@
2019-06-04 e65d231f4afda0678a1624027c0cf14a54ca9a44
2019-07-08 f2685df4451bd8b09fb4a24fd15dd7abd931e873

View File

@ -391,7 +391,7 @@ struct Linker::Binary : private Root_object, public Elf_object
{
Init::list()->exec_static_constructors();
/* call static construtors and register destructors */
/* call static constructors and register destructors */
Func * const ctors_start = (Func *)lookup_symbol("_ctors_start");
Func * const ctors_end = (Func *)lookup_symbol("_ctors_end");
for (Func * ctor = ctors_end; ctor != ctors_start; (*--ctor)());
@ -677,10 +677,6 @@ void Genode::init_ldso_phdr(Env &env)
void Genode::exec_static_constructors()
{
if (!binary_ptr->static_construction_pending())
warning("Don't call Genode::Env::exec_static_constructors() "
"in components without static globals");
binary_ptr->finish_static_construction();
}

View File

@ -1 +1 @@
-
2019-07-08 c148f59757080e6359261eeb03412ab14e9a14d8

View File

@ -1 +1 @@
-
2019-07-08 f42ce48fa499c93218d8660bc5613cad675432a5

View File

@ -1 +1 @@
-
2019-07-08 4aaa80b1ae1b60ba5ceda9e9d817b01c7ca5b442

View File

@ -1 +1 @@
2019-05-29 d301847c13a2f8c2659f4fdb634a8bfa185b2e27
2019-07-08 b0fc29349329ebc70e7f19cea93a23341ad9ec7a

View File

@ -2,8 +2,13 @@ linux-x.x.x/drivers/net/ethernet/freescale/fec.h
linux-x.x.x/drivers/net/ethernet/freescale/fec_main.c
linux-x.x.x/drivers/net/ethernet/freescale/fec_ptp.c
linux-x.x.x/drivers/net/phy/mdio_bus.c
linux-x.x.x/drivers/net/phy/mdio_device.c
linux-x.x.x/drivers/net/phy/mdio-boardinfo.c
linux-x.x.x/drivers/net/phy/mdio-boardinfo.h
linux-x.x.x/drivers/net/phy/phy_device.c
linux-x.x.x/drivers/net/phy/phy.c
linux-x.x.x/drivers/net/phy/phy-c45.c
linux-x.x.x/drivers/net/phy/phy-core.c
linux-x.x.x/drivers/net/phy/at803x.c
linux-x.x.x/net/core/skbuff.c
linux-x.x.x/net/ethernet/eth.c
@ -14,21 +19,26 @@ linux-x.x.x/include/asm-generic/bitops/__fls.h
linux-x.x.x/include/asm-generic/bitops/ffs.h
linux-x.x.x/include/asm-generic/bitops/fls.h
linux-x.x.x/include/asm-generic/bitops/fls64.h
linux-x.x.x/include/linux/cgroup-defs.h
linux-x.x.x/include/linux/errqueue.h
linux-x.x.x/include/linux/ethtool.h
linux-x.x.x/include/linux/fec.h
linux-x.x.x/include/linux/gpio/consumer.h
linux-x.x.x/include/linux/if_ether.h
linux-x.x.x/include/linux/list.h
linux-x.x.x/include/linux/list_nulls.h
linux-x.x.x/include/linux/log2.h
linux-x.x.x/include/linux/mdio.h
linux-x.x.x/include/linux/mii.h
linux-x.x.x/include/linux/mod_devicetable.h
linux-x.x.x/include/linux/net.h
linux-x.x.x/include/linux/netdev_features.h
linux-x.x.x/include/linux/phy.h
linux-x.x.x/include/linux/ptp_clock_kernel.h
linux-x.x.x/include/linux/rbtree.h
linux-x.x.x/include/linux/rculist.h
linux-x.x.x/include/linux/rculist_nulls.h
linux-x.x.x/include/linux/refcount.h
linux-x.x.x/include/linux/skbuff.h
linux-x.x.x/include/linux/socket.h
linux-x.x.x/include/linux/timecounter.h

View File

@ -0,0 +1,34 @@
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 74664a6..38cc18a 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -944,7 +944,10 @@ EXPORT_SYMBOL(phy_attached_print);
int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
u32 flags, phy_interface_t interface)
{
+#if 0
+ /* 'driver' has not been set yet on Genode */
struct module *ndev_owner = dev->dev.parent->driver->owner;
+#endif
struct mii_bus *bus = phydev->mdio.bus;
struct device *d = &phydev->mdio.dev;
bool using_genphy = false;
@@ -955,7 +958,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
* our own module->refcnt here, otherwise we would not be able to
* unload later on.
*/
- if (ndev_owner != bus->owner && !try_module_get(bus->owner)) {
+ if (/*ndev_owner != bus->owner &&*/ !try_module_get(bus->owner)) {
dev_err(&dev->dev, "failed to get the bus module\n");
return -EIO;
}
@@ -1060,7 +1063,9 @@ error_module_put:
module_put(d->driver->owner);
error_put_device:
put_device(d);
+#if 0
if (ndev_owner != bus->owner)
+#endif
module_put(bus->owner);
return err;
}

View File

@ -1,28 +0,0 @@
diff --git a/include/net/sock.h b/include/net/sock.h
index 14d3c07..818a1d1 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2148,8 +2148,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
*/
if (sock_flag(sk, SOCK_RCVTSTAMP) ||
(sk->sk_tsflags & SOF_TIMESTAMPING_RX_SOFTWARE) ||
- (kt.tv64 && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
- (hwtstamps->hwtstamp.tv64 &&
+ (kt && sk->sk_tsflags & SOF_TIMESTAMPING_SOFTWARE) ||
+ (hwtstamps->hwtstamp &&
(sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE)))
__sock_recv_timestamp(msg, sk, skb);
else
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b2df375..02c065f 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4212,7 +4212,7 @@ EXPORT_SYMBOL(skb_try_coalesce);
*/
void skb_scrub_packet(struct sk_buff *skb, bool xnet)
{
- skb->tstamp.tv64 = 0;
+ skb->tstamp = 0;
skb->pkt_type = PACKET_HOST;
skb->skb_iif = 0;
skb->ignore_df = 0;

View File

@ -1,11 +1,11 @@
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index b2a3220..18629c6 100644
index d4604bc..3f72629 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2825,7 +2825,7 @@ fec_enet_alloc_txq_buffers(struct net_device *ndev, unsigned int queue)
@@ -2798,7 +2798,7 @@ fec_enet_alloc_txq_buffers(struct net_device *ndev, unsigned int queue)
txq = fep->tx_queue[queue];
bdp = txq->tx_bd_base;
for (i = 0; i < txq->tx_ring_size; i++) {
bdp = txq->bd.base;
for (i = 0; i < txq->bd.ring_size; i++) {
- txq->tx_bounce[i] = kmalloc(FEC_ENET_TX_FRSIZE, GFP_KERNEL);
+ txq->tx_bounce[i] = kmalloc(FEC_ENET_TX_FRSIZE, GFP_KERNEL | GFP_LX_DMA);
if (!txq->tx_bounce[i])

View File

@ -1 +1 @@
4832c9de27d57c6e6eb3c04a6ff6be61b0237216
aa28d681fc4c5c74f8e287608db1aedcb5cc35fc

View File

@ -109,9 +109,9 @@ HASH_INPUT += $(REP_DIR)/lxip.list
# Freescale Ethernet controller
#
SRC_DIR_FEC := src/drivers/nic/fec
VERSION_FEC := 4.4.3
VERSION_FEC := 4.16.3
URL(fec) := https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(VERSION_FEC).tar.xz
SHA(fec) := 0b379cb19bbd7e38fc5a9a000ea927db55cce519a7400ec7fa705c581a6491dd
SHA(fec) := 0d6971a81da97e38b974c5eba31a74803bfe41aabc46d406c3acda56306c81a3
DIR(fec) := $(SRC_DIR_FEC)
TAR_OPT(fec) := --strip-components=1 --files-from - < <(sed 's/-x.x.x/-$(VERSION_FEC)/g' $(REP_DIR)/fec.list)
HASH_INPUT += $(REP_DIR)/fec.list
@ -209,6 +209,6 @@ PATCH_OPT(patches/intel_fb_hotplug.patch) := -p1 -d$(SRC_DIR_INTEL_FB)
# Freescale NIC
PATCH_OPT(patches/fec_skbuff_cast.patch) := -p1 -d$(SRC_DIR_FEC)
PATCH_OPT(patches/fec_tx_bounce_dma.patch) := -p1 -d$(SRC_DIR_FEC)
PATCH_OPT(patches/fec_tv64.patch) := -p1 -d$(SRC_DIR_FEC)
PATCH_OPT(patches/fec_ndev_owner.patch) := -p1 -d$(SRC_DIR_FEC)
# vi: set ft=make :

View File

@ -1 +1 @@
-
2019-07-08 75ba9b5a8c11d85e53546add4e53ec324c159162

View File

@ -1 +1 @@
-
2019-07-08 8a12c4092fe735ba4ef41459ef8f281ee04daec7

View File

@ -1 +1 @@
-
2019-07-08 3fbff923bd3dacb912bd41f7814e39d8dbcf15b4

View File

@ -0,0 +1,3 @@
Device drivers needed for scenarios
using one network interface

View File

@ -0,0 +1,2 @@
_/src/fec_nic_drv
_/raw/drivers_nic-imx7d_sabre

View File

@ -0,0 +1 @@
2019-07-08 22eb1f5c9d136d343223df400af544eff2bad931

View File

@ -1 +1 @@
2019-06-02 eb2cc52667e4610c8bbddf85a24f97e6cd8a3ce0
2019-07-08 3b58b141d1c4b2b9fa9629f76844bbbf103741d1

View File

@ -0,0 +1,4 @@
content: drivers.config
drivers.config:
cp $(REP_DIR)/recipes/raw/drivers_nic-imx7d_sabre/$@ $@

View File

@ -0,0 +1,31 @@
<config>
<parent-provides>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="ROM"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Timer"/>
<service name="Gpio"/>
</parent-provides>
<default caps="100"/>
<service name="Nic">
<default-policy> <child name="nic_drv"/> </default-policy> </service>
<start name="nic_drv" caps="130">
<binary name="fec_nic_drv"/>
<resource name="RAM" quantum="20M"/>
<provides> <service name="Nic"/> </provides>
<config>
<!-- ENET1: IRQ 120 + 32 = 152 -->
<card type="fsl,imx6sx-fec" mii="rgmii" irq="152" mmio="0x30be0000"/>
<!-- ENET2: IRQ 102 + 32 = 134 -->
<card type="fsl,imx6sx-fec" mii="rgmii" irq="134" mmio="0x30bf0000"/>
</config>
<route> <any-service> <parent/> </any-service> </route>
</start>
</config>

View File

@ -0,0 +1 @@
2019-06-27 583a26eccfd3241f727170f5d9451c9f2d55d3b4

View File

@ -1 +1 @@
-
2019-07-08 7c51e4525349b060af26ad830c054a7814a2b160

View File

@ -1 +1 @@
2019-05-29 dd0c4fb4fa6a2d705b2425d2d7b615924a5ec125
2019-07-08 1413b9d06046eb757a33d7061b2e1b6cef6ef236

View File

@ -1 +1 @@
2019-05-29 eb5b5c18902299f3b05a20a52fd339698ba2d910
2019-07-08 e0ebfce24480be007bc56a1b74133b1ff3e3fdfa

View File

@ -1 +1 @@
2019-06-05-a 8784b5b751c2211092e3c051a1d2c902af696ff4
2019-07-08 4269b76215f92c490d41db409bb7bce978d93aa1

View File

@ -1 +1 @@
2019-05-29 104b96104d6bbce09cb96e0278ba7abe779dafe8
2019-07-08 b47def76b9c9e2b6d5f316ca74831b09cec30918

View File

@ -5,6 +5,16 @@
#include <linux/timecounter.h>
#include <net/tso.h>
void bus_unregister(struct bus_type *bus)
{
TRACE_AND_STOP;
}
void class_unregister(struct class *cls)
{
TRACE_AND_STOP;
}
size_t copy_from_user(void *to, void const *from, size_t len)
{
TRACE_AND_STOP;
@ -45,6 +55,11 @@ void dma_free_coherent(struct device * d, size_t size, void *vaddr, dma_addr_t b
TRACE_AND_STOP;
}
void driver_unregister(struct device_driver *drv)
{
TRACE_AND_STOP;
}
void dst_release(struct dst_entry *dst)
{
TRACE_AND_STOP;
@ -61,6 +76,17 @@ void eth_hw_addr_random(struct net_device *dev)
TRACE_AND_STOP;
}
void ethtool_convert_legacy_u32_to_link_mode(unsigned long *dst, u32 legacy_u32)
{
TRACE_AND_STOP;
}
bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
const unsigned long *src)
{
TRACE_AND_STOP;
}
u32 ethtool_op_get_link(struct net_device * d)
{
TRACE_AND_STOP;
@ -89,12 +115,22 @@ void free_netdev(struct net_device * d)
TRACE_AND_STOP;
}
void free_uid(struct user_struct *dummy)
{
TRACE_AND_STOP;
}
bool gfp_pfmemalloc_allowed(gfp_t g)
{
TRACE_AND_STOP;
return -1;
}
bool gfpflags_allow_blocking(const gfp_t gfp_flags)
{
TRACE_AND_STOP;
}
int in_irq(void)
{
TRACE_AND_STOP;
@ -113,11 +149,31 @@ void *kmap_atomic(struct page *page)
return NULL;
}
const char *kobject_name(const struct kobject *kobj)
{
TRACE_AND_STOP;
}
void kunmap_atomic(void *addr)
{
TRACE_AND_STOP;
}
void might_sleep()
{
TRACE_AND_STOP;
}
void mm_unaccount_pinned_pages(struct mmpin *mmp)
{
TRACE_AND_STOP;
}
void module_put(struct module *mod)
{
TRACE_AND_STOP;
}
void netif_tx_disable(struct net_device *dev)
{
TRACE_AND_STOP;
@ -158,18 +214,53 @@ struct timespec64 ns_to_timespec64(const s64 nsec)
return ret;
}
int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
{
TRACE_AND_STOP;
}
int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
{
TRACE_AND_STOP;
}
struct device_node *of_node_get(struct device_node *node)
{
TRACE_AND_STOP;
return NULL;
}
void of_phy_deregister_fixed_link(struct device_node *np)
{
TRACE_AND_STOP;
}
int of_phy_register_fixed_link(struct device_node *np)
{
TRACE_AND_STOP;
return -1;
}
bool of_property_read_bool(const struct device_node *np, const char *propname)
{
TRACE_AND_STOP;
}
void phy_led_triggers_unregister(struct phy_device *phy)
{
TRACE_AND_STOP;
}
void pm_runtime_disable(struct device *dev)
{
TRACE_AND_STOP;
}
int pm_runtime_put(struct device *dev)
{
TRACE_AND_STOP;
}
void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event)
{
TRACE_AND_STOP;
@ -187,12 +278,6 @@ int ptp_clock_unregister(struct ptp_clock *ptp)
return -1;
}
int regulator_disable(struct regulator *r)
{
TRACE_AND_STOP;
return -1;
}
bool page_is_pfmemalloc(struct page *page)
{
TRACE_AND_STOP;
@ -214,6 +299,52 @@ void read_unlock_bh(rwlock_t * l)
TRACE_AND_STOP;
}
int regulator_disable(struct regulator *r)
{
TRACE_AND_STOP;
return -1;
}
int request_threaded_irq(unsigned int irq, irq_handler_t handler,
irq_handler_t thread_fn,
unsigned long flags, const char *name, void *dev)
{
TRACE_AND_STOP;
}
void sk_free(struct sock *sk)
{
TRACE_AND_STOP;
}
void sock_efree(struct sk_buff *skb)
{
TRACE_AND_STOP;
}
int strcmp(const char *s1, const char *s2)
{
TRACE_AND_STOP;
return -1;
}
char *strncpy(char *dst, const char *src, size_t s)
{
TRACE_AND_STOP;
}
int sysfs_create_link_nowarn(struct kobject *kobj,
struct kobject *target,
const char *name)
{
TRACE_AND_STOP;
}
void sysfs_remove_link(struct kobject *kobj, const char *name)
{
TRACE_AND_STOP;
}
unsigned int tcp_hdrlen(const struct sk_buff *skb)
{
TRACE_AND_STOP;
@ -252,42 +383,15 @@ void unregister_netdev(struct net_device * d)
TRACE_AND_STOP;
}
void usleep_range(unsigned long min, unsigned long max)
{
TRACE_AND_STOP;
}
void __vlan_hwaccel_put_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
{
TRACE_AND_STOP;
}
void module_put(struct module *mod)
{
TRACE_AND_STOP;
}
void put_device(struct device *dev)
{
TRACE_AND_STOP;
}
int strcmp(const char *s1, const char *s2)
{
TRACE_AND_STOP;
return -1;
}
void class_unregister(struct class *cls)
{
TRACE_AND_STOP;
}
void bus_unregister(struct bus_type *bus)
{
TRACE_AND_STOP;
}
void driver_unregister(struct device_driver *drv)
{
TRACE_AND_STOP;
}
struct user_namespace init_user_ns;
int sysctl_tstamp_allow_data;

View File

@ -436,6 +436,7 @@ const struct of_device_id *of_match_device(const struct of_device_id *matches,
return nullptr;
}
void * devm_ioremap_resource(struct device *dev, struct resource *res)
{
Fec * fec = (Fec*) dev->plat_dev->dev.of_node;
@ -674,15 +675,15 @@ struct page *alloc_pages(gfp_t gfp_mask, unsigned int order)
}
void *__alloc_page_frag(struct page_frag_cache *, unsigned int const fragsz,
gfp_t const gfp_mask)
void *page_frag_alloc(struct page_frag_cache *, unsigned int const fragsz,
gfp_t const gfp_mask)
{
struct page *page = allocate_pages(gfp_mask, fragsz);
return page ? page->addr : page;
}
void __free_page_frag(void *addr)
void page_frag_free(void *addr)
{
struct page *page = Addr_to_page_mapping::remove((unsigned long)addr);
@ -693,6 +694,7 @@ void __free_page_frag(void *addr)
kfree(page);
}
int driver_register(struct device_driver *drv)
{
new (Lx::Malloc::mem()) Driver(drv);
@ -899,9 +901,10 @@ bool napi_schedule_prep(struct napi_struct *n)
}
void napi_complete(struct napi_struct *n)
bool napi_complete_done(struct napi_struct *n, int work_done)
{
clear_bit(NAPI_STATE_SCHED, &n->state);
return true;
}
@ -982,7 +985,7 @@ static int of_mdiobus_register_phy(Fec::Mdio::Phy & ph, struct mii_bus *mdio)
if (!phy || IS_ERR(phy)) return 1;
phy->irq = ph.gpio_irq;
phy->dev.of_node = (device_node*) &ph;
phy->mdio.dev.of_node = (device_node*) &ph;
/* All data is now stored in the phy struct;
* register it */
@ -1129,10 +1132,23 @@ u64 timecounter_read(struct timecounter *tc)
return nsec;
}
/*********************
** DUMMY FUNCTIONS **
*********************/
int bus_register(struct bus_type *bus)
{
TRACE;
return 0;
}
int class_register(struct class_ *cls)
{
TRACE;
return 0;
}
void clk_disable_unprepare(struct clk * c)
{
TRACE;
@ -1144,6 +1160,12 @@ int clk_prepare_enable(struct clk * c)
return 0;
}
int device_bind_driver(struct device *dev)
{
TRACE;
return 0;
}
void device_initialize(struct device *dev)
{
TRACE;
@ -1155,107 +1177,46 @@ int device_init_wakeup(struct device *dev, bool val)
return 0;
}
int device_set_wakeup_enable(struct device *dev, bool enable)
{
TRACE;
return 0;
}
struct regulator *__must_check devm_regulator_get(struct device *dev, const char *id)
{
TRACE;
return nullptr;
}
struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, unsigned int index)
{
TRACE;
return nullptr;
}
bool of_phy_is_fixed_link(struct device_node *np)
{
TRACE;
return 0;
}
int pinctrl_pm_select_default_state(struct device *dev)
{
TRACE;
return -1;
}
int pinctrl_pm_select_sleep_state(struct device *dev)
{
TRACE;
return -1;
}
struct resource *platform_get_resource(struct platform_device * d, unsigned r1, unsigned r2)
{
TRACE;
return nullptr;
}
void pm_runtime_enable(struct device *dev)
void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
TRACE;
}
void pm_runtime_get_noresume(struct device *dev)
void dma_sync_single_for_device(struct device *dev, dma_addr_t addr,
size_t size, enum dma_data_direction dir)
{
TRACE;
}
int pm_runtime_set_active(struct device *dev)
{
TRACE;
return 0;
}
void pm_runtime_set_autosuspend_delay(struct device *dev, int delay)
{
TRACE;
}
void pm_runtime_use_autosuspend(struct device *dev)
{
TRACE;
}
struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent)
{
TRACE;
return (ptp_clock*)0xdeadbeef;
}
int regulator_enable(struct regulator * d)
{
TRACE;
return 0;
}
int class_register(struct class_ *cls)
{
TRACE;
return 0;
}
int try_module_get(struct module *mod)
{
TRACE;
return -1;
}
struct device *get_device(struct device *dev)
{
TRACE;
return dev;
}
int device_bind_driver(struct device *dev)
struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, unsigned int index)
{
TRACE;
return 0;
return nullptr;
}
void netif_tx_start_all_queues(struct net_device *dev)
bool netdev_uses_dsa(struct net_device *dev)
{
TRACE;
return false;
}
void netif_tx_lock_bh(struct net_device *dev)
@ -1263,18 +1224,7 @@ void netif_tx_lock_bh(struct net_device *dev)
TRACE;
}
int device_set_wakeup_enable(struct device *dev, bool enable)
{
TRACE;
return 0;
}
void trace_consume_skb(struct sk_buff * sb)
{
TRACE;
}
void trace_kfree_skb(struct sk_buff * sb, void * p)
void netif_tx_start_all_queues(struct net_device *dev)
{
TRACE;
}
@ -1289,22 +1239,17 @@ void netif_wake_queue(struct net_device * d)
TRACE;
}
bool netdev_uses_dsa(struct net_device *dev)
const void *of_get_mac_address(struct device_node *np)
{
TRACE;
return false;
return nullptr;
}
void dma_sync_single_for_device(struct device *dev, dma_addr_t addr,
size_t size, enum dma_data_direction dir)
{
TRACE;
}
int of_machine_is_compatible(const char *compat)
void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
TRACE;
return 0;
}
void of_node_put(struct device_node *node)
@ -1312,12 +1257,102 @@ void of_node_put(struct device_node *node)
TRACE;
}
const void *of_get_mac_address(struct device_node *np)
bool of_phy_is_fixed_link(struct device_node *np)
{
TRACE;
return 0;
}
void phy_led_trigger_change_speed(struct phy_device *phy)
{
TRACE;
}
int phy_led_triggers_register(struct phy_device *phy)
{
TRACE;
return -1;
}
int pinctrl_pm_select_default_state(struct device *dev)
{
TRACE;
return -1;
}
int pinctrl_pm_select_sleep_state(struct device *dev)
{
TRACE;
return -1;
}
int platform_get_irq_byname(struct platform_device *dev, const char *name)
{
TRACE;
return -1;
}
struct resource *platform_get_resource(struct platform_device * d, unsigned r1, unsigned r2)
{
TRACE;
return nullptr;
}
int platform_irq_count(struct platform_device *dev)
{
TRACE;
return 0;
}
void pm_runtime_enable(struct device *dev)
{
TRACE;
}
void pm_runtime_get_noresume(struct device *dev)
{
TRACE;
}
int pm_runtime_set_active(struct device *dev)
{
TRACE;
return 0;
}
void pm_runtime_use_autosuspend(struct device *dev)
{
TRACE;
}
void pm_runtime_set_autosuspend_delay(struct device *dev, int delay)
{
TRACE;
}
struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent)
{
TRACE;
return (ptp_clock*)0xdeadbeef;
}
void put_device(struct device *dev)
{
TRACE;
}
int regulator_enable(struct regulator * d)
{
TRACE;
return 0;
}
int request_module(const char *fmt, ...)
{
TRACE;
return 0;
}
void rtnl_lock(void)
{
TRACE;
@ -1328,16 +1363,36 @@ void rtnl_unlock(void)
TRACE;
}
int request_module(const char *fmt, ...)
void secpath_reset(struct sk_buff *skb)
{
TRACE;
return 0;
}
int bus_register(struct bus_type *bus)
int sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name)
{
TRACE;
return 0;
return -1;
}
void trace_consume_skb(struct sk_buff * sb)
{
TRACE;
}
void trace_kfree_skb(struct sk_buff * sb, void * p)
{
TRACE;
}
void trace_mdio_access(void *dummy, ...)
{
TRACE;
}
int try_module_get(struct module *mod)
{
TRACE;
return -1;
}
}

View File

@ -19,10 +19,43 @@
#include <lx_emul/extern_c_begin.h>
#include <lx_emul/barrier.h>
#include <lx_emul/compiler.h>
#include <lx_emul/printf.h>
#include <lx_emul/types.h>
static inline void __read_once_size(const volatile void *p, void *res, int size)
{
switch (size) {
case 1: *(__u8 *)res = *(volatile __u8 *)p; break;
case 2: *(__u16 *)res = *(volatile __u16 *)p; break;
case 4: *(__u32 *)res = *(volatile __u32 *)p; break;
case 8: *(__u64 *)res = *(volatile __u64 *)p; break;
default:
barrier();
__builtin_memcpy((void *)res, (const void *)p, size);
barrier();
}
}
#ifdef __cplusplus
#define READ_ONCE(x) \
({ \
barrier(); \
x; \
})
#else
#define READ_ONCE(x) \
({ \
union { typeof(x) __val; char __c[1]; } __u; \
__read_once_size(&(x), __u.__c, sizeof(x)); \
__u.__val; \
})
#endif
#include <lx_emul/list.h>
void lx_backtrace(void);
#define DEBUG_LINUX_PRINTK 0
@ -59,8 +92,6 @@ typedef int clockid_t;
enum { PAGE_SHIFT = 12 };
enum { HZ = 100UL, };
struct list_head;
typedef __u16 __le16;
typedef __u32 __le32;
typedef __u64 __le64;
@ -129,7 +160,6 @@ enum {
__GFP_REPEAT = 0x00000400u,
};
#include <lx_emul/barrier.h>
#include <uapi/linux/swab.h>
#include <lx_emul/byteorder.h>
#include <lx_emul/completion.h>
@ -138,6 +168,7 @@ enum {
#include <uapi/linux/ptp_clock.h>
#include <lx_emul/pm.h>
#include <lx_emul/scatterlist.h>
#include <lx_emul/kobject.h>
enum {
ETH_HLEN = 14,
@ -206,11 +237,6 @@ static inline s64 timespec64_to_ns(const struct timespec64 *ts)
ktime_t ns_to_ktime(u64 ns);
struct device_node
{
const char * full_name;
};
struct device;
struct device_driver;
@ -220,6 +246,7 @@ struct bus_type
const struct attribute_group **dev_groups;
int (*match)(struct device *dev, struct device_driver *drv);
int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
int (*probe)(struct device *dev);
const struct dev_pm_ops *pm;
@ -255,6 +282,7 @@ struct platform_device;
struct device {
char name[32];
struct device * parent;
struct kobject kobj;
struct device_driver *driver;
void * platform_data;
void * driver_data;
@ -263,7 +291,8 @@ struct device {
struct bus_type *bus;
struct class *class;
struct device_node *of_node;
struct platform_device * plat_dev;
struct fwnode_handle *fwnode;
struct platform_device *plat_dev;
};
struct platform_device {
@ -358,6 +387,7 @@ struct net_device
netdev_features_t features;
struct net_device_stats stats;
netdev_features_t hw_features;
int ifindex;
const struct net_device_ops *netdev_ops;
const struct ethtool_ops *ethtool_ops;
const struct header_ops *header_ops;
@ -365,7 +395,10 @@ struct net_device
unsigned int priv_flags;
unsigned short hard_header_len;
unsigned long mtu;
unsigned int min_mtu;
unsigned long max_mtu;
unsigned short type;
unsigned char min_header_len;
unsigned char addr_len;
struct netdev_hw_addr_list mc;
unsigned char *dev_addr;
@ -373,7 +406,7 @@ struct net_device
unsigned long tx_queue_len;
int watchdog_timeo;
struct timer_list watchdog_timer;
struct device dev;
struct device dev;
u16 gso_max_segs;
struct phy_device *phydev;
};
@ -427,8 +460,6 @@ static inline int rcu_read_lock_bh_held(void) { return 1; }
unsigned int jiffies_to_usecs(const unsigned long j);
struct rb_node {};
#define __aligned(x) __attribute__((aligned(x)))
#define kmemcheck_bitfield_begin(name)
@ -602,7 +633,10 @@ bool netif_queue_stopped(const struct net_device *dev);
#define CONFIG_ARM 1
#define CONFIG_ARCH_MXC 1
#define CONFIG_DEBUG_LOCK_ALLOC 1
#define CONFIG_MDIO_DEVICE 1
#define CONFIG_OF_MDIO 1
#define CONFIG_PHYLIB 1
#define CONFIG_PTP_1588_CLOCK 1
void rtnl_lock(void);
@ -617,26 +651,7 @@ void netif_tx_unlock_bh(struct net_device *dev);
void napi_enable(struct napi_struct *n);
void napi_disable(struct napi_struct *n);
static inline void __read_once_size(const volatile void *p, void *res, int size)
{
switch (size) {
case 1: *(__u8 *)res = *(volatile __u8 *)p; break;
case 2: *(__u16 *)res = *(volatile __u16 *)p; break;
case 4: *(__u32 *)res = *(volatile __u32 *)p; break;
case 8: *(__u64 *)res = *(volatile __u64 *)p; break;
default:
barrier();
__builtin_memcpy((void *)res, (const void *)p, size);
barrier();
}
}
#define READ_ONCE(x) \
({ \
union { typeof(x) __val; char __c[1]; } __u; \
__read_once_size(&(x), __u.__c, sizeof(x)); \
__u.__val; \
})
#define __randomize_layout
extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
size, unsigned long offset);
@ -669,12 +684,6 @@ gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
void dma_sync_single_for_device(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir);
bool napi_schedule_prep(struct napi_struct *n);
void __napi_schedule(struct napi_struct *n);
void napi_complete(struct napi_struct *n);
void *dev_get_platdata(const struct device *dev);
int is_valid_ether_addr(const u8 *);
@ -710,6 +719,473 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
struct resource *platform_get_resource(struct platform_device *, unsigned, unsigned);
/*******************************
** asm-generic/atomic-long.h **
*******************************/
static inline int atomic_long_cmpxchg(atomic_long_t *v, long old, long n) {
return cmpxchg(&v->counter, old, n); }
/************************
** linux/capability.h **
************************/
bool capable(int);
/*************************
** linux/cgroup-defs.h **
*************************/
struct cgroup;
/******************
** linux/cred.h **
******************/
struct user_struct *current_user();
/*******************
** linux/delay.h **
*******************/
void usleep_range(unsigned long min, unsigned long max);
/*************************
** linux/etherdevice.h **
*************************/
static inline void ether_addr_copy(u8 *dst, const u8 *src)
{
*(u32 *)dst = *(const u32 *)src;
*(u16 *)(dst+ 4) = *(const u16 *)(src + 4);
}
/*********************
** linux/ethtool.h **
*********************/
struct ethtool_link_ksettings;
/****************
** linux/fs.h **
****************/
typedef struct {
size_t written;
size_t count;
union {
char __user *buf;
void *data;
} arg;
int error;
} read_descriptor_t;
/********************
** linux/fwnode.h **
********************/
struct fwnode_handle { int dummy; };
/**********************
** linux/mm_types.h **
**********************/
struct page_frag_cache
{
bool pfmemalloc;
};
/*****************
** linux/gfp.h **
*****************/
void *page_frag_alloc(struct page_frag_cache *nc,
unsigned int fragsz, gfp_t gfp_mask);
void page_frag_free(void *addr);
/*********************
** linux/if_vlan.h **
*********************/
static inline bool eth_type_vlan(__be16 ethertype) { return false; }
/***********************
** linux/interrupt.h **
***********************/
#define IRQF_SHARED 0x00000080
#define IRQF_ONESHOT 0x00002000
int request_threaded_irq(unsigned int irq, irq_handler_t handler,
irq_handler_t thread_fn,
unsigned long flags, const char *name, void *dev);
/*********************
** linux/lockdep.h **
*********************/
struct lockdep_map { };
#define mutex_release(l, n, i)
/*****************************
** linux/mod_devicetable.h **
*****************************/
#define MDIO_NAME_SIZE 32
/************************
** linux/memcontrol.h **
************************/
struct mem_cgroup;
#define mem_cgroup_sockets_enabled 0
static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg) {
return false; }
/***********************
** linux/netdevice.h **
***********************/
void __napi_schedule(struct napi_struct *n);
typedef struct sk_buff **(*gro_receive_t)(struct sk_buff **, struct sk_buff *);
struct sk_buff **call_gro_receive(gro_receive_t cb, struct sk_buff **head, struct sk_buff *skb);
void dev_consume_skb_any(struct sk_buff *skb);
bool napi_complete_done(struct napi_struct *n, int work_done);
bool napi_schedule_prep(struct napi_struct *n);
void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush);
/****************
** linux/of.h **
****************/
struct device_node
{
const char * full_name;
struct fwnode_handle fwnode;
};
#define of_fwnode_handle(node) \
({ \
typeof(node) __of_fwnode_handle_node = (node); \
\
__of_fwnode_handle_node ? \
&__of_fwnode_handle_node->fwnode : NULL; \
})
int of_machine_is_compatible(const char *compat);
bool of_property_read_bool(const struct device_node *np, const char *propname);
/***********************
** linux/of_device.h **
***********************/
int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env);
/*********************
** linux/of_mdio.h **
*********************/
int of_mdio_parse_addr(struct device *dev, const struct device_node *np);
void of_phy_deregister_fixed_link(struct device_node *np);
/*****************
** linux/pci.h **
*****************/
int dev_is_pci(struct device *dev);
struct pci_dev;
struct device_node * pci_device_to_OF_node(const struct pci_dev *pdev);
#define to_pci_dev(n) NULL
/******************************
** linux/phy_led_triggers.h **
******************************/
void phy_led_trigger_change_speed(struct phy_device *phy);
int phy_led_triggers_register(struct phy_device *phy);
void phy_led_triggers_unregister(struct phy_device *phy);
/*****************************
** linux/platform_device.h **
*****************************/
int platform_get_irq_byname(struct platform_device *dev, const char *name);
int platform_irq_count(struct platform_device *);
/************************
** linux/pm_runtime.h **
************************/
void pm_runtime_disable(struct device *dev);
int pm_runtime_put(struct device *dev);
/*********************
** linux/preempt.h **
*********************/
#define in_task() (1)
/**********************
** linux/rcupdate.h **
**********************/
#define rcu_assign_pointer(p, v) (p = v);
#define rcu_dereference_protected(p, c) p
/*************************
** linux/scatterlist.h **
*************************/
#define sg_is_last(sg) ((sg)->page_link & 0x02)
/**************************
** linux/sched/signal.h **
**************************/
unsigned long rlimit(unsigned int limit);
/************************
** linux/sched/user.h **
************************/
struct user_struct
{
atomic_long_t locked_vm;
};
void free_uid(struct user_struct *);
struct user_struct *get_uid(struct user_struct *u);
/******************
** linux/sctp.h **
******************/
struct sctphdr
{
unsigned unused;
};
struct kmem_cache *kmem_cache_create_usercopy(const char *name, size_t size,
size_t align, slab_flags_t flags,
size_t useroffset, size_t usersize,
void (*ctor)(void *));
/******************
** linux/slab.h **
******************/
void *kcalloc(size_t n, size_t size, gfp_t flags);
void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
/**********************
** linux/spinlock.h **
**********************/
int spin_is_locked(spinlock_t *lock);
/********************
** linux/stddef.h **
********************/
#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
/*******************
** linux/sysfs.h **
*******************/
int sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name);
int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, const char *name);
void sysfs_remove_link(struct kobject *kobj, const char *name);
/*************************
** linux/thread_info.h **
*************************/
static inline void check_object_size(const void *ptr, unsigned long n,
bool to_user) { }
void __bad_copy_from(void);
void __bad_copy_to(void);
static inline void copy_overflow(int size, unsigned long count)
{
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
}
static __always_inline bool
check_copy_size(const void *addr, size_t bytes, bool is_source)
{
int sz = __compiletime_object_size(addr);
if (unlikely(sz >= 0 && sz < bytes)) {
if (!__builtin_constant_p(bytes))
copy_overflow(sz, bytes);
else if (is_source)
__bad_copy_from();
else
__bad_copy_to();
return false;
}
check_object_size(addr, bytes, is_source);
return true;
}
/****************************
** linux/user_namespace.h **
****************************/
struct user_namespace { };
/********************
** linux/uidgid.h **
********************/
kuid_t make_kuid(struct user_namespace *from, uid_t uid);
/*****************
** linux/uio.h **
*****************/
struct kvec
{
void *iov_base;
size_t iov_len;
};
bool _copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i);
static __always_inline __must_check
bool copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i)
{
if (unlikely(!check_copy_size(addr, bytes, false)))
return false;
else
return _copy_from_iter_full(addr, bytes, i);
}
bool copy_from_iter_full_nocache(void *addr, size_t bytes, struct iov_iter *i);
bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
/******************
** linux/wait.h **
******************/
bool wq_has_sleeper(struct wait_queue_head *wq_head);
/********************
** net/checksum.h **
********************/
static inline __wsum
csum_block_sub(__wsum csum, __wsum csum2, int offset)
{
return csum_block_add(csum, ~csum2, offset);
}
static inline __wsum csum_unfold(__sum16 n)
{
return (__force __wsum)n;
}
/**************************
** net/flow_dissector.h **
**************************/
#define FLOW_DISSECTOR_F_PARSE_1ST_FRAG BIT(0)
/*************************
** net/net_namespace.h **
*************************/
struct net;
/******************
** net/l3mdev.h **
******************/
int l3mdev_master_ifindex_by_index(struct net *net, int ifindex);
/*********************
** net/pkt_sched.h **
*********************/
#define DEFAULT_TX_QUEUE_LEN 1000
/***********************
** soc/imx/cpuidle.h **
***********************/
static inline void imx6q_cpuidle_fec_irqs_used(void) { }
static inline void imx6q_cpuidle_fec_irqs_unused(void) { }
/*************************
** trace/events/mdio.h **
*************************/
void trace_mdio_access(void *dummy, ...);
/*********************************
** uapi/asm-generic/resource.h **
*********************************/
# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
/*****************************
** uapi/linux/capability.h **
*****************************/
#define CAP_IPC_LOCK 14
/*************************
** uapi/linux/kernel.h **
*************************/
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
/******************************
** uapi/linux/libc-compat.h **
******************************/
#define __UAPI_DEF_IF_IFMAP 1
#define __UAPI_DEF_IF_IFNAMSIZ 1
#define __UAPI_DEF_IF_IFREQ 1
#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
/************************
** uapi/linux/types.h **
************************/
typedef unsigned __poll_t;
/************************/
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
#include <uapi/linux/if_ether.h>
#include <uapi/linux/if_packet.h>
#include <uapi/linux/ethtool.h>
@ -727,30 +1203,6 @@ bool device_may_wakeup(struct device *dev);
int enable_irq_wake(unsigned int irq);
int disable_irq_wake(unsigned int irq);
struct ethtool_ops {
int(*get_settings)(struct net_device *, struct ethtool_cmd *);
int(*set_settings)(struct net_device *, struct ethtool_cmd *);
void(*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
int(*get_regs_len)(struct net_device *);
void(*get_regs)(struct net_device *, struct ethtool_regs *, void *);
void(*get_wol)(struct net_device *, struct ethtool_wolinfo *);
int(*set_wol)(struct net_device *, struct ethtool_wolinfo *);
int(*nway_reset)(struct net_device *);
u32(*get_link)(struct net_device *);
int(*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
int(*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
void(*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
int(*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
void(*get_strings)(struct net_device *, u32 stringset, u8 *);
void(*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
int(*get_sset_count)(struct net_device *, int);
int(*get_ts_info)(struct net_device *, struct ethtool_ts_info *);
int(*get_tunable)(struct net_device *,
const struct ethtool_tunable *, void *);
int(*set_tunable)(struct net_device *,
const struct ethtool_tunable *, const void *);
};
u32 ethtool_op_get_link(struct net_device *);
void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
@ -764,10 +1216,6 @@ int pinctrl_pm_select_sleep_state(struct device *dev);
void netif_tx_disable(struct net_device *dev);
#include <lx_emul/list.h>
#define rcu_assign_pointer(p, v) (p = v);
#include <linux/rculist.h>
#define netdev_hw_addr_list_for_each(ha, l) \
@ -899,8 +1347,6 @@ typedef int rwlock_t;
bool gfp_pfmemalloc_allowed(gfp_t);
struct user_namespace {};
struct cred {
struct user_namespace * user_ns;
};
@ -909,7 +1355,10 @@ struct file {
const struct cred * f_cred;
};
struct net;
struct net
{
struct user_namespace * user_ns;
};
struct percpu_counter {
s64 count;
@ -975,9 +1424,6 @@ struct net *dev_net(const struct net_device *dev);
#define read_pnet(pnet) (&init_net)
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
void bitmap_fill(unsigned long *dst, int nbits);
void bitmap_zero(unsigned long *dst, int nbits);
@ -1041,7 +1487,10 @@ void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages)
enum { UNDER_LIMIT, SOFT_LIMIT, OVER_LIMIT };
struct inode {};
struct inode
{
kuid_t i_uid;
};
struct vm_area_struct;
@ -1097,11 +1546,6 @@ struct page *virt_to_head_page(const void *x);
typeof(type) name
#define this_cpu_ptr(ptr) ptr
struct page_frag_cache
{
bool pfmemalloc;
};
void *__alloc_page_frag(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask);
unsigned long local_irq_save(unsigned long flags);
@ -1170,7 +1614,10 @@ void sg_mark_end(struct scatterlist *sg);
void sg_set_buf(struct scatterlist *, const void *, unsigned int);
void sg_set_page(struct scatterlist *, struct page *, unsigned int, unsigned int);
struct inet_skb_parm { };
struct inet_skb_parm
{
int iif;
};
enum {
IPPROTO_IP = 0,
@ -1374,10 +1821,6 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
for (child = of_get_next_available_child(parent, NULL); child != NULL; \
child = of_get_next_available_child(parent, child))
u32 mmd_eee_cap_to_ethtool_sup_t(u16 eee_cap);
u32 mmd_eee_adv_to_ethtool_adv_t(u16 eee_adv);
u16 ethtool_adv_to_mmd_eee_adv_t(u32 adv);
int driver_register(struct device_driver *drv);
void driver_unregister(struct device_driver *drv);
@ -1401,9 +1844,10 @@ static inline bool is_multicast_ether_addr_64bits(const u8 addr[6+2])
static inline bool ether_addr_equal_64bits(const u8 addr1[6+2], const u8 addr2[6+2])
{
u64 fold = (*(const u64 *)addr1) ^ (*(const u64 *)addr2);
const u16 *a = (const u16 *)addr1;
const u16 *b = (const u16 *)addr2;
return (fold << 16) == 0;
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0;
}
static inline bool eth_proto_is_802_3(__be16 proto)
@ -1483,6 +1927,7 @@ void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
struct pm_qos_request {};
#define dma_wmb() __asm__ __volatile__ ("dmb oshst" : : : "memory")
#include <lx_emul/extern_c_end.h>
#endif /* _SRC__DRIVERS__NIC__FEC__LX_EMUL_H_ */

View File

@ -29,16 +29,17 @@ CC_C_OPT += -std=gnu89
#
# Reduce build noise of compiling contrib code
#
CC_OPT_fec_ptp = -Wno-unused-but-set-variable -Wno-unused-variable \
-Wno-maybe-uninitialized -Wno-uninitialized
CC_OPT_fec_main = -Wno-unused-but-set-variable -Wno-unused-variable \
-Wno-pointer-sign -Wno-int-conversion -Wno-unused-function \
-Wno-uninitialized
CC_OPT_skbuff = -Wno-pointer-sign -Wno-int-conversion -Wno-uninitialized
CC_OPT_mdio_bus = -Wno-implicit-int -Wno-unused-function -Wno-pointer-sign
CC_OPT_eth = -Wno-pointer-sign -Wno-unused-function
CC_OPT_phy = -Wno-unused-function -Wno-unused-but-set-variable
CC_OPT_at803x = -Wno-unused-variable
CC_OPT_fec_ptp = -Wno-unused-but-set-variable -Wno-unused-variable \
-Wno-maybe-uninitialized -Wno-uninitialized
CC_OPT_fec_main = -Wno-unused-but-set-variable -Wno-unused-variable \
-Wno-pointer-sign -Wno-int-conversion -Wno-unused-function \
-Wno-uninitialized
CC_OPT_skbuff = -Wno-pointer-sign -Wno-int-conversion -Wno-uninitialized
CC_OPT_mdio_bus = -Wno-implicit-int -Wno-unused-function -Wno-pointer-sign
CC_OPT_eth = -Wno-pointer-sign -Wno-unused-function
CC_OPT_phy = -Wno-unused-function -Wno-unused-but-set-variable
CC_OPT_phy_device = -Wno-unused-function
CC_OPT_at803x = -Wno-unused-variable
vpath %.c $(LX_CONTRIB_DIR)/drivers/net/ethernet/freescale
vpath %.c $(LX_CONTRIB_DIR)/drivers/net/phy

View File

@ -258,7 +258,7 @@ int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
*********************/
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) { TRACE; return 0; }
char *kobject_name(const struct kobject *kobj) { TRACE; return 0; }
const char *kobject_name(const struct kobject *kobj) { TRACE; return 0; }
char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) { TRACE; return 0; }

View File

@ -231,7 +231,7 @@ int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
*********************/
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) { TRACE; return 0; }
char *kobject_name(const struct kobject *kobj) { TRACE; return 0; }
const char *kobject_name(const struct kobject *kobj) { TRACE; return 0; }
char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) { TRACE; return 0; }

View File

@ -70,6 +70,10 @@
#define smp_read_barrier_depends() do { } while (0)
#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); barrier(); } while (0)
#ifndef __compiletime_object_size
# define __compiletime_object_size(obj) -1
#endif
/**************************
** linux/compiler-gcc.h **
**************************/
@ -78,6 +82,8 @@
#define __packed __attribute__((packed))
#endif
#define __weak __attribute__((weak))
#define __aligned(x) __attribute__((aligned(x)))
#define uninitialized_var(x) x = x

View File

@ -26,6 +26,7 @@
#define __is_defined(x) ___is_defined(x)
#define IS_BUILTIN(option) __is_defined(option)
#define IS_ENABLED(option) IS_BUILTIN(option)
#define IS_REACHABLE(option) IS_BUILTIN(option)
/********************
** linux/kernel.h **

View File

@ -52,6 +52,6 @@ struct kobj_uevent_env;
int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...);
void kobject_put(struct kobject *);
char *kobject_name(const struct kobject *kobj);
const char *kobject_name(const struct kobject *kobj);
char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask);
struct kobject * kobject_create_and_add(const char *, struct kobject *);

Some files were not shown because too many files have changed in this diff Show More