[linux-yocto] [kernel-cache yocto-4.19][PATCH 2/2] bsp/axxiaarm64: Add initial fragments

2021-04-21 Thread Daniel Dragomir
Fragments were ported from yocto-4.12 branch and adapted
for kernel 4.19.

Signed-off-by: Daniel Dragomir 
---
 bsp/axxiaarm64/axxiaarm64-preempt-rt.scc |   8 +
 bsp/axxiaarm64/axxiaarm64-standard.scc   |   8 +
 bsp/axxiaarm64/axxiaarm64.cfg| 254 +++
 bsp/axxiaarm64/axxiaarm64.scc|   8 +
 bsp/axxiaarm64/edac.cfg  |  21 ++
 bsp/axxiaarm64/edac.scc  |   4 +
 bsp/axxiaarm64/hardware.kcf  |   1 +
 bsp/axxiaarm64/kvm.cfg   |  17 ++
 bsp/axxiaarm64/kvm.scc   |   4 +
 bsp/axxiaarm64/rapidio.cfg   |  27 +++
 bsp/axxiaarm64/rapidio.scc   |   4 +
 11 files changed, 356 insertions(+)
 create mode 100644 bsp/axxiaarm64/axxiaarm64-preempt-rt.scc
 create mode 100644 bsp/axxiaarm64/axxiaarm64-standard.scc
 create mode 100644 bsp/axxiaarm64/axxiaarm64.cfg
 create mode 100644 bsp/axxiaarm64/axxiaarm64.scc
 create mode 100644 bsp/axxiaarm64/edac.cfg
 create mode 100644 bsp/axxiaarm64/edac.scc
 create mode 100644 bsp/axxiaarm64/hardware.kcf
 create mode 100644 bsp/axxiaarm64/kvm.cfg
 create mode 100644 bsp/axxiaarm64/kvm.scc
 create mode 100644 bsp/axxiaarm64/rapidio.cfg
 create mode 100644 bsp/axxiaarm64/rapidio.scc

diff --git a/bsp/axxiaarm64/axxiaarm64-preempt-rt.scc 
b/bsp/axxiaarm64/axxiaarm64-preempt-rt.scc
new file mode 100644
index ..8f3b0754
--- /dev/null
+++ b/bsp/axxiaarm64/axxiaarm64-preempt-rt.scc
@@ -0,0 +1,8 @@
+define KMACHINE axxiaarm64
+define KTYPE preempt-rt
+define KARCH arm64
+
+include ktypes/preempt-rt
+branch axxia
+
+include axxiaarm64.scc
diff --git a/bsp/axxiaarm64/axxiaarm64-standard.scc 
b/bsp/axxiaarm64/axxiaarm64-standard.scc
new file mode 100644
index ..d9e57fea
--- /dev/null
+++ b/bsp/axxiaarm64/axxiaarm64-standard.scc
@@ -0,0 +1,8 @@
+define KMACHINE axxiaarm64
+define KTYPE standard
+define KARCH arm64
+
+include ktypes/standard
+branch axxia
+
+include axxiaarm64.scc
diff --git a/bsp/axxiaarm64/axxiaarm64.cfg b/bsp/axxiaarm64/axxiaarm64.cfg
new file mode 100644
index ..0d1c493b
--- /dev/null
+++ b/bsp/axxiaarm64/axxiaarm64.cfg
@@ -0,0 +1,254 @@
+#.
+#WARNING
+#
+# This file is a kernel configuration fragment, and not a full kernel
+# configuration file.  The final kernel configuration is made up of
+# an assembly of processed fragments, each of which is designed to
+# capture a specific part of the final configuration (e.g. platform
+# configuration, feature configuration, and board specific hardware
+# configuration).  For more information on kernel configuration, please
+# consult the product documentation.
+#
+#.
+
+#
+# General setup
+#
+# CONFIG_FHANDLE is not set
+CONFIG_AUDIT=y
+
+#
+# Timers subsystem
+#
+CONFIG_NO_HZ_IDLE=y
+
+#
+# Platform selection
+#
+CONFIG_ARCH_AXXIA=y
+CONFIG_ARCH_THUNDER=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_XGENE=y
+
+#
+# Processor Features
+#
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_KEXEC=y
+
+#
+# Boot options
+#
+CONFIG_CMDLINE="console=ttyAMA0"
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+CONFIG_PCI_MSI=y
+
+#
+# Kernel Features
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_FW_LOADER=y
+CONFIG_DMA_CMA=y
+
+CONFIG_MTD=y
+CONFIG_MTD_OF_PARTS=y
+
+#
+# Network testing
+#
+# CONFIG_WIRELESS is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+
+#
+# LPDDR & LPDDR2 PCM memory drivers
+#
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_DTC=y
+CONFIG_OF=y
+
+#
+# Device Tree and Open Firmware support
+#
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM_SIZE=35000
+
+#
+# Misc devices
+#
+CONFIG_AXXIA_MTC=y
+CONFIG_ATA=y
+CONFIG_AXXIA_NCR=y
+CONFIG_ARCH_AXXIA_NCR_RESET_CHECK=y
+CONFIG_AXXIA_OEM=y
+CONFIG_AXXIA_PEI=y
+CONFIG_AXXIA_FAULT=y
+CONFIG_AXXIA_MDIO=y
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI_PROC_FS is not set
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+# CONFIG_SCSI_LOWLEVEL is not set
+
+#
+# Controllers with non-SFF native interface
+#
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_AHCI_XGENE=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO_AMBAKMI=y
+
+#
+# Character devices
+#
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_AXXIA=y
+# CONFIG_HW_RANDOM_XGENE is not set
+# CONFIG_HW_RANDOM_VIRTIO is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_AXXIA=y
+
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
+
+#
+# Memory mapped GPIO drive

[linux-yocto] [kernel-cache yocto-4.19][PATCH 1/2] bsp/axxiaarm: Add initial fragments

2021-04-21 Thread Daniel Dragomir
Fragments were ported from yocto-4.12 branch and adapted
for kernel 4.19.

Signed-off-by: Daniel Dragomir 
---
 bsp/axxiaarm/axxiaarm-preempt-rt.scc |   8 +
 bsp/axxiaarm/axxiaarm-standard.scc   |   8 +
 bsp/axxiaarm/axxiaarm.cfg| 272 +++
 bsp/axxiaarm/axxiaarm.scc|  12 ++
 bsp/axxiaarm/edac.cfg|  19 ++
 bsp/axxiaarm/edac.scc|   4 +
 bsp/axxiaarm/hardware.kcf|   1 +
 bsp/axxiaarm/kvm.cfg |  17 ++
 bsp/axxiaarm/kvm.scc |   4 +
 bsp/axxiaarm/rapidio.cfg |  25 +++
 bsp/axxiaarm/rapidio.scc |   4 +
 11 files changed, 374 insertions(+)
 create mode 100644 bsp/axxiaarm/axxiaarm-preempt-rt.scc
 create mode 100644 bsp/axxiaarm/axxiaarm-standard.scc
 create mode 100644 bsp/axxiaarm/axxiaarm.cfg
 create mode 100644 bsp/axxiaarm/axxiaarm.scc
 create mode 100644 bsp/axxiaarm/edac.cfg
 create mode 100644 bsp/axxiaarm/edac.scc
 create mode 100644 bsp/axxiaarm/hardware.kcf
 create mode 100644 bsp/axxiaarm/kvm.cfg
 create mode 100644 bsp/axxiaarm/kvm.scc
 create mode 100644 bsp/axxiaarm/rapidio.cfg
 create mode 100644 bsp/axxiaarm/rapidio.scc

diff --git a/bsp/axxiaarm/axxiaarm-preempt-rt.scc 
b/bsp/axxiaarm/axxiaarm-preempt-rt.scc
new file mode 100644
index ..e1c2aec8
--- /dev/null
+++ b/bsp/axxiaarm/axxiaarm-preempt-rt.scc
@@ -0,0 +1,8 @@
+define KMACHINE axxiaarm
+define KTYPE preempt-rt
+define KARCH arm
+
+include ktypes/preempt-rt
+branch axxia
+
+include axxiaarm.scc
diff --git a/bsp/axxiaarm/axxiaarm-standard.scc 
b/bsp/axxiaarm/axxiaarm-standard.scc
new file mode 100644
index ..cc57a7ee
--- /dev/null
+++ b/bsp/axxiaarm/axxiaarm-standard.scc
@@ -0,0 +1,8 @@
+define KMACHINE axxiaarm
+define KTYPE standard
+define KARCH arm
+
+include ktypes/standard
+branch axxia
+
+include axxiaarm.scc
diff --git a/bsp/axxiaarm/axxiaarm.cfg b/bsp/axxiaarm/axxiaarm.cfg
new file mode 100644
index ..3de16b43
--- /dev/null
+++ b/bsp/axxiaarm/axxiaarm.cfg
@@ -0,0 +1,272 @@
+#.
+#WARNING
+#
+# This file is a kernel configuration fragment, and not a full kernel
+# configuration file.  The final kernel configuration is made up of
+# an assembly of processed fragments, each of which is designed to
+# capture a specific part of the final configuration (e.g. platform
+# configuration, feature configuration, and board specific hardware
+# configuration).  For more information on kernel configuration, please
+# consult the product documentation.
+#
+#.
+
+#
+# System Type
+#
+CONFIG_ARCH_AXXIA=y
+
+#
+# Axxia platform type
+#
+CONFIG_ARCH_AXXIA_GIC=y
+CONFIG_ARCH_AXXIA_DT=y
+CONFIG_ARCH_AXXIA_NCR_RESET_CHECK=y
+CONFIG_ARM_TIMER_SP804=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_LPAE=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_SWP_EMULATE=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_CACHE_L2X0=y
+
+CONFIG_ARM_ERRATA_430973=y
+CONFIG_ARM_ERRATA_458693=y
+CONFIG_ARM_ERRATA_460075=y
+CONFIG_ARM_ERRATA_643719=y
+CONFIG_ARM_ERRATA_742230=y
+CONFIG_ARM_ERRATA_742231=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_743622=y
+CONFIG_ARM_ERRATA_751472=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_ERRATA_798181=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_PL310_ERRATA_753970=y
+CONFIG_PL310_ERRATA_769419=y
+
+#
+# Bus support
+#
+CONFIG_ARM_AMBA=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+CONFIG_PCI_MSI=y
+
+#
+# Kernel Features
+#
+CONFIG_SMP=y
+CONFIG_HAVE_ARM_ARCH_TIMER=y
+CONFIG_HIGHMEM=y
+CONFIG_NR_CPUS=16
+
+#
+# Boot options
+#
+CONFIG_USE_OF=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+
+#
+# At least one emulation must be selected
+#
+CONFIG_VFP=y
+CONFIG_NEON=y
+
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_FW_LOADER=y
+
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_AFS_PARTS=y
+CONFIG_MTD_OF_PARTS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
+
+#
+# Network testing
+#
+# CONFIG_WIRELESS is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
+
+CONFIG_DTC=y
+CONFIG_OF=y
+
+CONFIG_BLK_DEV_LOOP=y
+
+#
+# Misc devices
+#
+CONFIG_AXXIA_MTC=y
+CONFIG_AXXIA_NCR=y
+CONFIG_ATA=y
+CONFIG_AXXIA_FAULT=y
+CONFIG_AXXIA_MDIO=y
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_AT24=y
+

[linux-yocto] [kernel-cache yocto-5.10][PATCH] features/numa: Remove NODES_SPAN_OTHER_NODES option

2021-03-12 Thread Daniel Dragomir
Remove obsolete NODES_SPAN_OTHER_NODES kernel option which was
removed from kernel starting with v5.7.0, commit acd3f5c441e9
("mm: remove early_pfn_in_nid() and CONFIG_NODES_SPAN_OTHER_NODES").

Signed-off-by: Daniel Dragomir 
---
 features/numa/numa.cfg | 1 -
 1 file changed, 1 deletion(-)

diff --git a/features/numa/numa.cfg b/features/numa/numa.cfg
index 351c5d97..cc550c4c 100644
--- a/features/numa/numa.cfg
+++ b/features/numa/numa.cfg
@@ -1,7 +1,6 @@
 # SPDX-License-Identifier: MIT
 CONFIG_NUMA=y
 CONFIG_X86_64_ACPI_NUMA=y
-CONFIG_NODES_SPAN_OTHER_NODES=y
 CONFIG_NUMA_EMU=y
 CONFIG_NODES_SHIFT=6
 CONFIG_NEED_MULTIPLE_NODES=y
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9542): 
https://lists.yoctoproject.org/g/linux-yocto/message/9542
Mute This Topic: https://lists.yoctoproject.org/mt/81281841/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 34/61] arm64: Use a raw spinlock in __install_bp_hardening_cb()

2021-03-04 Thread Daniel Dragomir
From: Marek Bykowski 

__install_bp_hardening_cb() is called with the spinlock taken to allow each
CPU to take its turn when allocating slots. With the RT patches applied,
the spinlock becomes a mutex, and we get warnings about sleeping in
the cpu stop callback executing in the atomic context from the migration
thread. Changing to a raw spinlock resolves it.

BUG: scheduling while atomic: migration//84/0x0002
Modules linked in:
[] cpu_stopper_thread+0x9c/0x128
CPU:  PID: 76 Comm: migration/8 Tainted: GW 4.19.19-rt3 
#1
Hardware name: AXM56xx Victoria (DT)
Call trace:
 dump_backtrace+0x0/0x168
 show_stack+0x24/0x30
 dump_stack+0x9c/0xd4
 __schedule_bug+0x74/0xc0
 __schedule+0x500/0x558
 schedule+0x44/0xf0
 rt_spin_lock_slowlock_locked+0x100/0x298
 rt_spin_lock_slowlock+0x68/0x98
 rt_spin_lock+0x60/0x70
 enable_smccc_arch_workaround_1+0x154/0x270
 __enable_cpu_capability+0x24/0x38
 multi_cpu_stop+0x100/0x148
 cpu_stopper_thread+0xa4/0x128
 smpboot_thread_fn+0x1f8/0x2c0
 kthread+0x104/0x130
 ret_from_fork+0x10/0x1c

Signed-off-by: James Morse 
Signed-off-by: Will Deacon 
Signed-off-by: Marek Bykowski 
Signed-off-by: John Jacques 
---
 arch/arm64/kernel/cpu_errata.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
index d191ce8..589f0b3 100644
--- a/arch/arm64/kernel/cpu_errata.c
+++ b/arch/arm64/kernel/cpu_errata.c
@@ -114,10 +114,10 @@ static void install_bp_hardening_cb(bp_hardening_cb_t fn,
const char *hyp_vecs_start,
const char *hyp_vecs_end)
 {
-   static DEFINE_SPINLOCK(bp_lock);
+   static DEFINE_RAW_SPINLOCK(bp_lock);
int cpu, slot = -1;
 
-   spin_lock(_lock);
+   raw_spin_lock(_lock);
for_each_possible_cpu(cpu) {
if (per_cpu(bp_hardening_data.fn, cpu) == fn) {
slot = per_cpu(bp_hardening_data.hyp_vectors_slot, cpu);
@@ -133,7 +133,7 @@ static void install_bp_hardening_cb(bp_hardening_cb_t fn,
 
__this_cpu_write(bp_hardening_data.hyp_vectors_slot, slot);
__this_cpu_write(bp_hardening_data.fn, fn);
-   spin_unlock(_lock);
+   raw_spin_unlock(_lock);
 }
 #else
 #define __smccc_workaround_1_smc_start NULL
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9506): 
https://lists.yoctoproject.org/g/linux-yocto/message/9506
Mute This Topic: https://lists.yoctoproject.org/mt/81082044/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 07/61] ARM64: Enable the identity mapping to allow the MMU disabling

2021-03-04 Thread Daniel Dragomir
From: John Jacques 

Add the setup_mm_for_reboot() function needed for kexec.

Signed-off-by: Geoff Levand 
Signed-off-by: John Jacques 
Signed-off-by: Charlie Paul 
Signed-off-by: Daniel Dragomir 
---
 arch/arm64/mm/mmu.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 0fa5581..755adcd 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -660,6 +660,17 @@ void __init paging_init(void)
 }
 
 /*
+ * Enable the identity mapping to allow the MMU disabling.
+ */
+void setup_mm_for_reboot(void)
+{
+   cpu_set_reserved_ttbr0();
+   flush_tlb_all();
+   cpu_set_idmap_tcr_t0sz();
+   cpu_switch_mm(idmap_pg_dir, _mm);
+}
+
+/*
  * Check whether a kernel address is valid (derived from arch/x86/).
  */
 int kern_addr_valid(unsigned long addr)
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9501): 
https://lists.yoctoproject.org/g/linux-yocto/message/9501
Mute This Topic: https://lists.yoctoproject.org/mt/81082029/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 31/61] pmu: Fix Compiler Warnings

2021-03-04 Thread Daniel Dragomir
From: John Jacques 

.../include/linux/pmu.h:17:31: warning: 'struct adb_request'
declared inside parameter list will not be visible outside of
this definition or declaration
   extern int pmu_request(struct adb_request *req,
 ^~~
Signed-off-by: John Jacques 
Signed-off-by: Charlie Paul 
Signed-off-by: Daniel Dragomir 
---
 include/linux/pmu.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 9ac8fc6..bebf4680 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -9,6 +9,7 @@
 #ifndef _LINUX_PMU_H
 #define _LINUX_PMU_H
 
+#include 
 #include 
 
 
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9505): 
https://lists.yoctoproject.org/g/linux-yocto/message/9505
Mute This Topic: https://lists.yoctoproject.org/mt/81082035/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 04/61] ARM: head.S: axxia: Set the NS bit since memory is non-secure

2021-03-04 Thread Daniel Dragomir
From: John Jacques 

Axxia AXM55xx memory is by architecture non-secure, so set NS bit.

Signed-off-by: John Jacques 
Signed-off-by: Charlie Paul 
Signed-off-by: Daniel Dragomir 
---
 arch/arm/kernel/head.S | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 11b94f7..2f3fe86 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -323,6 +323,10 @@ __create_page_tables:
 #endif
 #else
orr r3, r3, #PMD_SECT_XN
+#ifdef CONFIG_ARCH_AXXIA
+   /* Axxia memory is non-secure, so set NS. */
+   orr r7, r7, #0x20
+#endif
str r3, [r0], #4
 #endif
 
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9500): 
https://lists.yoctoproject.org/g/linux-yocto/message/9500
Mute This Topic: https://lists.yoctoproject.org/mt/81082028/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 19/61] ARM64: entry.S: Add Fault Handling for Axxia

2021-03-04 Thread Daniel Dragomir
From: Charlie Paul 

The purpose is to handle SErrors (Asynchronous Aborts) caused by
sRIO optional register accesses, which are not supported by the
Axxia sRIO hardware. As it isn't possible to determine the cause
completely, a mechanism is provided to enable or disable masking
from user space.

Adding a fault handler allows enumerating the sRIO buss without
crashing.

Signed-off-by: Charlie Paul 
Signed-off-by: John Jacques 
Signed-off-by: Daniel Dragomir 
---
 arch/arm64/kernel/entry.S | 32 
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index b582580..e9efdc3 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -509,7 +509,23 @@ el0_fiq_invalid:
 ENDPROC(el0_fiq_invalid)
 
 el0_error_invalid:
+#ifdef CONFIG_AXXIA_FAULT
+   kernel_entry0
+   mov x0, sp
+   mov x1, #0
+   mrs x2, esr_el1
+   bl  axxia_x9xlf_fault
+   cmp x0, #0
+   beq 1f
+   mov x0, sp  // Return Failure
+   mov x1, #BAD_ERROR
+   mrs x2, esr_el1
+   b   bad_mode
+1:
+   kernel_exit 0   // Return Success
+#else
inv_entry 0, BAD_ERROR
+#endif
 ENDPROC(el0_error_invalid)
 
 #ifdef CONFIG_COMPAT
@@ -531,7 +547,23 @@ el1_fiq_invalid:
 ENDPROC(el1_fiq_invalid)
 
 el1_error_invalid:
+#ifdef CONFIG_AXXIA_FAULT
+   kernel_entry1
+   mov x0, sp
+   mov x1, #1
+   mrs x2, esr_el1
+   bl  axxia_x9xlf_fault
+   cmp x0, #0
+   beq 1f
+   mov x0, sp  // Return Failure
+   mov x1, #BAD_ERROR
+   mrs x2, esr_el1
+   b   bad_mode
+1:
+   kernel_exit 1
+#else
inv_entry 1, BAD_ERROR
+#endif
 ENDPROC(el1_error_invalid)
 
 /*
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9504): 
https://lists.yoctoproject.org/g/linux-yocto/message/9504
Mute This Topic: https://lists.yoctoproject.org/mt/81082034/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 09/61] genirq: axxia: Fix irq_set_affinity to allow use with buslocks

2021-03-04 Thread Daniel Dragomir
From: David Mercado 

Modify irq_set_affinity() to allow usage of bus locks with "slow bus" IRQ
controllers. This only affects those BSPs that use bus locks in their IRQ
controllers, such as the Intel Axxia GIC. The recommendation for this
change originated from Thomax Gleixner at Linutronix.

Signed-off-by: David Mercado 
Signed-off-by: John Jacques 
Signed-off-by: Charlie Paul 
Signed-off-by: Daniel Dragomir 
---
 kernel/irq/manage.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 69effb2..61763ad 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -333,6 +333,22 @@ int irq_set_affinity_locked(struct irq_data *data, const 
struct cpumask *mask,
return ret;
 }
 
+#ifdef CONFIG_ARCH_AXXIA
+int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool 
force)
+{
+   unsigned long flags;
+   struct irq_desc *desc = irq_get_desc_buslock(irq, ,
+   IRQ_GET_DESC_CHECK_GLOBAL);
+   int ret;
+
+   if (!desc)
+   return -EINVAL;
+
+   ret = irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force);
+   irq_put_desc_busunlock(desc, flags);
+   return ret;
+}
+#else
 int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool 
force)
 {
struct irq_desc *desc = irq_to_desc(irq);
@@ -347,6 +363,7 @@ int __irq_set_affinity(unsigned int irq, const struct 
cpumask *mask, bool force)
raw_spin_unlock_irqrestore(>lock, flags);
return ret;
 }
+#endif
 
 int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
 {
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9502): 
https://lists.yoctoproject.org/g/linux-yocto/message/9502
Mute This Topic: https://lists.yoctoproject.org/mt/81082032/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard*/axxia] [PATCH 03/61] ARM: head.S: axxia: Allow more granularity in the starting offset

2021-03-04 Thread Daniel Dragomir
From: John Jacques 

For Axxia AXM55xx, the U-Boot is kept in the bottom 8M of memory,
so the math in arch/arm/boot/compressed/head.S would "align"
8M to 0M and wipe out U-Boot.

Without this changes, Linux has to be rather severely aligned.

Signed-off-by: John Jacques 
Signed-off-by: Charlie Paul 
Signed-off-by: Daniel Dragomir 
---
 arch/arm/boot/compressed/head.S | 12 
 arch/arm/kernel/head.S  |  5 +
 2 files changed, 17 insertions(+)

diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index e205bbb..cf605eb 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -172,6 +172,8 @@ not_angel:
safe_svcmode_maskall r0
msr spsr_cxsf, r9   @ Save the CPU boot mode in
@ SPSR
+#else
+   teqppc, #0x0c03 @ turn off interrupts
 #endif
/*
 * Note that some cache flushing and other stuff may
@@ -206,7 +208,12 @@ not_angel:
mov r4, pc
and r4, r4, #0xf800
/* Determine final kernel image address. */
+#ifdef CONFIG_ARCH_AXXIA
+   ldr r3, =TEXT_OFFSET
+   add r4, r4, r3
+#else
add r4, r4, #TEXT_OFFSET
+#endif
 #else
ldr r4, =zreladdr
 #endif
@@ -337,7 +344,12 @@ restart:   adr r0, LC0
 * of RAM and hope for the best.
 */
cmp r0, #1
+#ifdef CONFIG_ARCH_AXXIA
+   ldr r1, =TEXT_OFFSET
+   sub r0, r4, r1
+#else
sub r0, r4, #TEXT_OFFSET
+#endif
bic r0, r0, #1
add r0, r0, #0x100
mov r1, r6
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 90add5d..11b94f7 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -52,8 +52,13 @@
.equswapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE
 
.macro  pgtbl, rd, phys
+#ifdef CONFIG_ARCH_AXXIA
+   ldr \rd, =(TEXT_OFFSET - PG_DIR_SIZE)
+   add \rd, \rd, \phys
+#else
add \rd, \phys, #TEXT_OFFSET
sub \rd, \rd, #PG_DIR_SIZE
+#endif
.endm
 
 /*
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9499): 
https://lists.yoctoproject.org/g/linux-yocto/message/9499
Mute This Topic: https://lists.yoctoproject.org/mt/81082027/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [PULL REQUEST] Intel Axxia updates to linux-yocto-4.19

2021-03-04 Thread Daniel Dragomir
Hello Bruce!

This is the first pull request for Axxia changes on Kernel 4.19 which were
ported from our 4.12 Yocto branches.
We tried a better cleanup on Axxia specific changes, we reworked and better
documented the necessary commits which are changing non-BSP areas.
I sent only those patches on mailing list for a easier review.

Please review and pull the patches from
https://github.com/axxia/linux-yocto.git
into
git://git.yoctoproject.org/linux-yocto

Pull the following branches which were rebased on latest from upstream:
v4.19/standard/preempt-rt/axxia based on v4.19/standard/preempt-rt/base
v4.19/standard/axxia based on v4.19/standard/base

I checked all the patches with checkpatch.pl script and fixed all errors.
Also, we run regression testing on each rebase to a new tag from upstream
and fixed regressions if any (for axxiaarm and axxiaarm64 BSPs).

Thank you,
Daniel Dragomir

Charlie Paul (7):
  genirq/cpuhotplug: axxia: Enable the force flag
  ARM64: entry.S: Add Fault Handling for Axxia
  ARM: dts: axxia: Updated SPI and UART to support DMA
  usb: dwc3: axxia: Add support the core clocks
  spi: pl022: Add enable-dma processing
  net: Use standard MDIO interface for AXXIA FEMAC Driver
  net: ethernet: Add ethtool Stats to NEMAC driver

David Mercado (1):
  genirq: axxia: Fix irq_set_affinity to allow use with buslocks

John Jacques (44):
  ARM: Enhance platform support for Intel Axxia AXM55xx
  ARM: dts: Add Axxia AXM55xx device tree files
  ARM: head.S: axxia: Allow more granularity in the starting offset
  ARM: head.S: axxia: Set the NS bit since memory is non-secure
  ARM: kmap: axxia: Prevent overlap for 16th core
  ARM64: dts: Add Axxia X9/AXM56xx and XLF/AXC67xx device tree files
  ARM64: Enable the identity mapping to allow the MMU disabling
  clk: Change Clock Definitions for Axxia AXM55xx
  char: hwrng: Add Axxia HW Random number generator
  dmaengine: Add Axxia DMA32 driver support
  edac: Add support for Axxia AXM56xx and AXC67xx
  gpio: Add custom driver for Axxia SoCs
  gpio: pl061: Readd removed platform data
  misc: Add drivers for Axxia MISC devices
  misc: Add a backward compatibility layer for Axxia MTC
  rapidio: Add support for Axxia AXM55xx and AXM56xx
  power: reset: Add support for Axxia DDR Retention reset
  usb: xhci: Add CI13612A USB driver for Axxia AXM55xx
  usb: dwc3: Add Axxia xHCI DWC3 USB support
  usb: hub: fix over-current race condition
  mtd: m25p80: add support for Spansion S25FL016K
  mtd: spi-nor: add support for Winbond W25Q128JVSIM
  net: ethernet: Add Intel Axxia FEMAC driver
  net: ethernet: Add Intel Axxia NEMAC GigE driver
  PCI: Add Intel Axxia PCIe host controller driver
  i2c: axxia: Use BIT(x) macro and fix indentation issues
  tty: serial: pl011: Updated Baud Rate Calcualtion
  pmu: Fix Compiler Warnings
  fs/vmfs: Adding arm vmfs file system
  dt-bindings: axxia: update and add documentation
  ARM64: dts: Add Reference to the L2 Cache in CPU Descriptions
  net: Pad SKBs Properly in the AXXIA FEMAC Driver
  net: Use eth_spb_pad() in the AXXIA NEMAC Driver
  net: Set Min/Max MTU for AXXIA 5500 FEMAC Driver
  net: Set Min/Max MTU for AXXIA 5600/6700 NEMAC Driver
  power: reset: Update Axxia DDR Retention Handling
  misc: axxia: Use the new ARM SMC Call Interface
  misc: axxia: Update OEM Handling for backwards compatibility
  i2c: axxia: Add a Lock Around i2c Transfers
  i2c: axxia: Allow Interrupted Transfers
  i2c: axxia: Change the I2C Timeout
  misc: Add a Lock to the Axxia MDIO Bus
  PCI: axxia: Support 32 Bit Endpoints
  arm: perf: add Cortex-A15 PMU in armv7_pmu_probe_table

Marek Bykowski (9):
  arm64: Use a raw spinlock in __install_bp_hardening_cb()
  firmware: arch64: Add SMC call testing module
  dt-bindings: Update documentation for arm-ccn perf
  perf: arm-ccn: Enable stats for CCN-512 interconnect
  perf: arm-ccn: Allow instrumentation of arm-ccn
  ARM64: dts: axxia: Support CCN (cache coherent network) perf
  edac: axxia: Update SMC (System Memory Controller) EDAC driver
  bus: arm-ccn: add a new driver managing the ARM CCN interrupts
  bus: arm-ccn: L3 EDAC: register L3 EDAC interrupts within the core

 Documentation/devicetree/bindings/arm/axxia.txt|8 +-
 .../devicetree/bindings/arm/axxia/edac.txt |   14 +
 .../devicetree/bindings/arm/axxia/edac_cm.txt  |   21 +
 .../devicetree/bindings/arm/axxia/edac_cpu.txt |   14 +
 .../devicetree/bindings/arm/axxia/edac_l1.txt  |   15 +
 .../devicetree/bindings/arm/axxia/edac_l2.txt  |   15 +
 .../devicetree/bindings/arm/axxia/edac_l3.txt  |   26 +
 .../devicetree/bindings/clock/lsi,axm5516-clks.txt |   29 -
 .../devicetree/bindings/hwrng/axxia_rng.txt|   15 +
 .../devicetree/bindings/i2c/i2c-axxia.txt  |6 +-
 .../devicetree/bindings/misc/axxia-mtc.txt |   15 +
 .../devicetree/bindings/net/axxia-femac.txt|   20 +
 .../devicetree/bindings/net/axxia-mdio.txt |   26 +
 .../devicetree/bindings/pci/intel,axxia-pcie.txt

[linux-yocto][v4.19/standard/preempt-rt/base][PATCH] sched/core: Fix CPU offline/online process

2020-11-16 Thread Daniel Dragomir
From: Daniel Dragomir 

This error was introduced in commit d02636e8d3 ("Merge branch
'v4.19/standard/base' into v4.19/standard/preempt-rt/base")
when a merge conflict has overwrited the changes from commit
373491f1f4 ("sched/core: Fix illegal RCU from offline CPUs").

This BUG occurs when running cpu_hotplug_stress testcase from
KTS or when stressing one CPU by switching it online/offline
(echo 0 and 1 in /sys/devices/system/cpu/cpu0/online).

kernel BUG at kernel/fork.c:633!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
Process sh (pid: 2016, stack limit = 0xca5ad524)
CPU: 10 PID: 2016 Comm: sh Not tainted 4.19.131-rt30 axxia_gen2
Hardware name: AXM56xx Victoria (DT)
pstate: 6005 (nZCv daif -PAN -UAO)
pc : __mmdrop+0x120/0x138
lr : finish_cpu+0x68/0x70
sp : ff8012153a40
x29: ff8012153a40 x28: ffc07b389e00
x27:  x26: 00407610f000
x25: ffc07ee62ee0 x24: 
x23: ff80080dfc20 x22: ff8008d9a9d8
x21: ff8008d53ee0 x20: 0055
x19: ff8008dc1b58 x18: 0001
x17:  x16: 
x15:  x14: ff8008d89688
x13: ff8088d918d7 x12: ff8008d918e0
x11: ff8008da4000 x10: ff8012153a00
x9 : ffd0 x8 : ff80121539d0
x7 :  x6 : 0001
x5 : fffb x4 : 0030
x3 : 0030 x2 : ff8008dc1b58
x1 : ff8008dc1ba4 x0 : ff8008dc1b58
Call trace:
 __mmdrop+0x120/0x138
 finish_cpu+0x68/0x70
 cpuhp_invoke_callback+0xa8/0x800
 _cpu_down+0x100/0x220
 do_cpu_down+0x48/0x70
 cpu_down+0x24/0x30
 cpu_subsys_offline+0x20/0x30
 device_offline+0xa4/0xd0
 online_store+0x60/0xc0
 dev_attr_store+0x44/0x60
 sysfs_kf_write+0x5c/0x78
 kernfs_fop_write+0xd8/0x1d0
 __vfs_write+0x60/0x178
 vfs_write+0xac/0x1b0
 ksys_write+0x74/0xe8
 __arm64_sys_write+0x24/0x30
 el0_svc_common+0xa4/0x1a0
 el0_svc_compat_handler+0x30/0x40
 el0_svc_compat+0x8/0x18
 Code: a94153f3 a9425bf5 a8c37bfd d65f03c0 (d421)
---[ end trace 0002 ]---
BUG: Bad rss-counter state mm:1136ddcb idx:0 val:1012
BUG: Bad rss-counter state mm:1136ddcb idx:1 val:5902
BUG: non-zero pgtables_bytes on freeing mm: 180224

Signed-off-by: Daniel Dragomir 
---
 kernel/sched/core.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 218b93a..c62dbf9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5702,11 +5702,8 @@ void idle_task_exit(void)
switch_mm(mm, _mm, current);
finish_arch_post_lock_switch();
}
-   /*
-* Defer the cleanup to an alive cpu. On RT we can neither
-* call mmdrop() nor mmdrop_delayed() from here.
-*/
-   per_cpu(idle_last_mm, smp_processor_id()) = mm;
+
+   /* finish_cpu(), as ran on the BP, will clean up the active_mm state */
 }
 
 /*
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9160): 
https://lists.yoctoproject.org/g/linux-yocto/message/9160
Mute This Topic: https://lists.yoctoproject.org/mt/78299586/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto][v4.19/standard/preempt-rt/base][PATCH] net: core: Fix dead loop on virtual device lo

2020-11-16 Thread Daniel Dragomir
From: Daniel Dragomir 

Multiple alarming messages are shown on running tcp bandwidth test
from lmbench suite and the test fails with timeout:
Dead loop on virtual device lo, fix it urgently!

The cause for this failure is commit edbe65322391 ("net: place xmit
recursion in softnet data") which overwrites some preempt-rt specific
changes (PREEMPT_RT_FULL) from commit 7963359759cb ("net: move
xmit_recursion to per-task variable on -RT ").

The original version for commit edbe65322391 from kernel.org:
https://lkml.org/lkml/2020/6/29/1000

Signed-off-by: Daniel Dragomir 
---
 net/core/dev.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 6f7e36e..1734396 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3834,7 +3834,11 @@ static int __dev_queue_xmit(struct sk_buff *skb, struct 
net_device *sb_dev)
if (dev->flags & IFF_UP) {
int cpu = smp_processor_id(); /* ok because BHs are off */
 
+#ifdef CONFIG_PREEMPT_RT_FULL
+   if (txq->xmit_lock_owner != current) {
+#else
if (txq->xmit_lock_owner != cpu) {
+#endif
if (dev_xmit_recursion())
goto recursion_alert;
 
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9161): 
https://lists.yoctoproject.org/g/linux-yocto/message/9161
Mute This Topic: https://lists.yoctoproject.org/mt/78299587/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v4.19/standard/preempt-rt/base][PATCH 1/2] net: Fix redefinition of dev_recursion_level

2020-07-08 Thread Daniel Dragomir
This error was introduced in commit e6f1979ced24 ("Merge branch
'v4.19/standard/base' into v4.19/standard/preempt-rt/base").

include/linux/netdevice.h:3066:19: error: redefinition of 'dev_recursion_level'
|  3066 | static inline int dev_recursion_level(void)
|   |   ^~~
include/linux/netdevice.h:2641:19: note: previous definition of 
'dev_recursion_level' was here
|  2641 | static inline int dev_recursion_level(void)
|   |   ^~~
include/linux/netdevice.h:3071: warning: "XMIT_RECURSION_LIMIT" redefined
|  3071 | #define XMIT_RECURSION_LIMIT
include/linux/netdevice.h:2639: note: this is the location of the previous 
definition
|  2639 | #define XMIT_RECURSION_LIMIT 10

Signed-off-by: Daniel Dragomir 
---
 include/linux/netdevice.h | 47 ---
 1 file changed, 47 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0c5e160bc248..4b1234e58fa7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2636,53 +2636,6 @@ void netdev_freemem(struct net_device *dev);
 void synchronize_net(void);
 int init_dummy_netdev(struct net_device *dev);
 
-#define XMIT_RECURSION_LIMIT   10
-#ifdef CONFIG_PREEMPT_RT_FULL
-static inline int dev_recursion_level(void)
-{
-   return current->xmit_recursion;
-}
-
-static inline int xmit_rec_read(void)
-{
-   return current->xmit_recursion;
-}
-
-static inline void xmit_rec_inc(void)
-{
-   current->xmit_recursion++;
-}
-
-static inline void xmit_rec_dec(void)
-{
-   current->xmit_recursion--;
-}
-
-#else
-
-DECLARE_PER_CPU(int, xmit_recursion);
-
-static inline int dev_recursion_level(void)
-{
-   return this_cpu_read(xmit_recursion);
-}
-
-static inline int xmit_rec_read(void)
-{
-   return __this_cpu_read(xmit_recursion);
-}
-
-static inline void xmit_rec_inc(void)
-{
-   __this_cpu_inc(xmit_recursion);
-}
-
-static inline void xmit_rec_dec(void)
-{
-   __this_cpu_dec(xmit_recursion);
-}
-#endif
-
 struct net_device *dev_get_by_index(struct net *net, int ifindex);
 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8807): 
https://lists.yoctoproject.org/g/linux-yocto/message/8807
Mute This Topic: https://lists.yoctoproject.org/mt/75389500/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[linux-yocto] [linux-yocto v4.19/standard/preempt-rt/base][PATCH 2/2] net: core: Fix undeclared error for devnet_rename_seq

2020-07-08 Thread Daniel Dragomir
Starting with commit 29d1d0c72464 ("net: core: device_rename:
Use rwsem instead of a seqcount") devnet_rename_seq was
replaced with devnet_rename_sem.

This piece of code was left by mistake after a -rt merge and
causes the following error:

net/core/dev.c:1263:28: error: 'devnet_rename_seq' undeclared
(first use in this function); did you mean 'devnet_rename_sem'?
|  1263 |  __raw_write_seqcount_end(_rename_seq);
|   |^

Signed-off-by: Daniel Dragomir 
---
 net/core/dev.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 2c901b4f6687..0a494ebdf374 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1258,11 +1258,6 @@ int dev_change_name(struct net_device *dev, const char 
*newname)
}
 
return err;
-
-outunlock:
-   __raw_write_seqcount_end(_rename_seq);
-   mutex_unlock(_rename_mutex);
-   return err;
 }
 
 /**
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8806): 
https://lists.yoctoproject.org/g/linux-yocto/message/8806
Mute This Topic: https://lists.yoctoproject.org/mt/75389498/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[linux-yocto] [linux-yocto v4.19/standard/preempt-rt/base][PATCH] workqueue: Fix incompatible pointer type error

2020-06-30 Thread Daniel Dragomir
Use raw_spin_unlock_irq instead spin_unlock_irq to avoid incompatible
pointer type error on preempt-rt branch:

kernel/workqueue.c:4176:17: error: passing argument 1 of 'rt_spin_lock'
from incompatible pointer type [-Werror=incompatible-pointer-types]
|  4176 |   spin_lock_irq(_mayday_lock);
|   | ^~~
|   | |
|   | raw_spinlock_t * {aka struct raw_spinlock *}
include/linux/spinlock_rt.h:40:40: note: in definition of macro 'spin_lock'
|40 | #define spin_lock(lock)   rt_spin_lock(lock)
|   |^~~~
kernel/workqueue.c:4176:3: note: in expansion of macro 'spin_lock_irq'
|  4176 |   spin_lock_irq(_mayday_lock);
|   |   ^
include/linux/spinlock_rt.h:21:49: note: expected 'spinlock_t *'
{aka 'struct spinlock *'} but argument is of type 'raw_spinlock_t *'
{aka 'struct raw_spinlock *'}
|21 | extern void __lockfunc rt_spin_lock(spinlock_t *lock);
|   | ^~~~

Signed-off-by: Daniel Dragomir 
---
 kernel/workqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index d88d11cfbad5..75f59299dd06 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4173,9 +4173,9 @@ void destroy_workqueue(struct workqueue_struct *wq)
struct worker *rescuer = wq->rescuer;
 
/* this prevents new queueing */
-   spin_lock_irq(_mayday_lock);
+   raw_spin_lock_irq(_mayday_lock);
wq->rescuer = NULL;
-   spin_unlock_irq(_mayday_lock);
+   raw_spin_unlock_irq(_mayday_lock);
 
/* rescuer will empty maydays list before exiting */
kthread_stop(rescuer->task);
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8788): 
https://lists.yoctoproject.org/g/linux-yocto/message/8788
Mute This Topic: https://lists.yoctoproject.org/mt/75213396/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[linux-yocto] [linux-yocto v4.9] Possible merge failure for v4.9.202 preempt-rt branches

2020-05-14 Thread Daniel Dragomir
Hello Bruce!

I'm planning to send some patches for AXXIA branches for 4.9 linux-yocto 
kernels (also some for 4.1).

First, it is still allowed to send patches for those old kernels?

Then, when preparing the AXXIA patches against the latest tag (v4.9.202) for 
the preempt-rt branch (standard/preempt-rt/axxia/base) from 
git://git.yoctoproject.org/linux-yocto-4.9 repo, I get a lot of build errors.

I also tried a clean poky build for qemuarm machine with linux-yocto-rt_4.9 
building the latest v4.9.202 tag from standard/preempt-rt/base branch and get 
the same errors. By default, 4.9 linux-yocto-rt recipe from poky (rocko branch) 
uses v4.9.113 version which builds ok.

It's possible that some of the errors cames from some merge failures:
- when v4.9.163 tag wes merged to the standard/preempt-rt/base branch. There 
were some extra changes in the merge commit 
34a0f925427864bc92a556a533a73a12247709f4 ("Merge branch 'standard/base' into 
standard/preempt-rt/base") meant to fix merge conflicts maybe, but the changes 
to kernel/locking/rtmutex.c brings build errors
- when v4.9.176 tag was merged to the standard/preempt-rt/base branch. There 
were some extra changes in the merge commit 
369744f8022767ea2c1b6ca32f8249f5bdb1ce80 ("Merge branch 'standard/base' into 
standard/preempt-rt/base") meant to fix merge conflicts maybe, but the changes 
to kernel/cpu.c brings build errors

The latest good tag I found is v4.9.162.

Which is the best approach for this: working to fix all those failures in new 
commits on top of v4.9.202 even if this is an EOL kernel for yocto, or should 
we reset preempt-rt branches (axxia ones at least) to v4.9.162 version?

Here are some of the errors I get on qemuarm build:

tmp/work-shared/qemuarm/kernel-source/kernel/cpu.c:1118:6: error: redefinition 
of 'set_cpu_possible'
 void set_cpu_possible(unsigned int cpu, bool possible

tmp/work-shared/qemuarm/kernel-source/include/linux/cpumask.h:92:29: error: 
expected identifier or '(' before 'const'
 #define cpu_possible_mask ((const struct cpumask *)&__cpu_possible_mask)

tmp/work-shared/qemuarm/kernel-source/include/linux/export.h:60:20: error: 
pasting "__kstrtab_" and "(" does not give a valid preprocessing token
  static const char __kstrtab_##sym[]

tmp/work-shared/qemuarm/kernel-source/kernel/locking/rtmutex.c:351:21: error: 
redefinition of 'rt_mutex_get_top_task'
|  struct task_struct *rt_mutex_get_top_task(struct task_struct *task)

tmp/work-shared/qemuarm/kernel-source/kernel/locking/rtmutex.c:982:2: error: 
implicit declaration of function 'rt_mutex_deadlock_account_lock'; did you mean 
'rt_mutex_deadlock_check'? [-Werror=implicit-function-declaration]
|   rt_mutex_deadlock_account_lock(lock, task)


Regards,
Daniel
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8667): 
https://lists.yoctoproject.org/g/linux-yocto/message/8667
Mute This Topic: https://lists.yoctoproject.org/mt/74201726/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-