[PATCH] packagegroup-core-sdk: Disable SANITIZERS for ARC
Sanitizers are not yet supported on ARC. Signed-off-by: Alexey Brodkin --- meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb index 45e8c13585..15d0989b76 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb @@ -27,6 +27,7 @@ RDEPENDS_packagegroup-core-sdk = "\ tcl" SANITIZERS = "libasan-dev libubsan-dev" +SANITIZERS_arc = "" SANITIZERS_microblaze = "" SANITIZERS_mipsarch = "" SANITIZERS_nios2 = "" -- 2.16.2 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] packagegroup-core-sdk: Disable SANITIZERS for ARC
Looks ok to me On Mon, Nov 12, 2018 at 5:09 AM Alexey Brodkin wrote: > > Sanitizers are not yet supported on ARC. > > Signed-off-by: Alexey Brodkin > --- > meta/recipes-core/packagegroups/packagegroup-core-sdk.bb | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb > b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb > index 45e8c13585..15d0989b76 100644 > --- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb > +++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb > @@ -27,6 +27,7 @@ RDEPENDS_packagegroup-core-sdk = "\ > tcl" > > SANITIZERS = "libasan-dev libubsan-dev" > +SANITIZERS_arc = "" > SANITIZERS_microblaze = "" > SANITIZERS_mipsarch = "" > SANITIZERS_nios2 = "" > -- > 2.16.2 > ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH v4 0/4] kgdb: Fix kgdb_roundup_cpus()
This series was originally part of the series ("serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb") but it made sense to split it up. It's believed that dropping into kgdb should be more robust once these patches are applied. Changes in v4: - Removed smp_mb() calls. - Also clear out .debuggerinfo. - Also clear out .debuggerinfo and .task for the master. - Remove clearing out in kdb_stub for offline CPUs; it's now redundant. Changes in v3: - No separate init call. - Don't round up the CPU that is doing the rounding up. - Add "#ifdef CONFIG_SMP" to match the rest of the file. - Updated desc saying we don't solve the "failed to roundup" case. - Document the ignored parameter. - Don't round up a CPU that failed rounding up before new for v3. - Don't back trace on a cpu that didn't round up new for v3. Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). Douglas Anderson (4): kgdb: Remove irq flags from roundup kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function() kgdb: Don't round up a CPU that failed rounding up before kdb: Don't back trace on a cpu that didn't round up arch/arc/kernel/kgdb.c | 10 ++ arch/arm/kernel/kgdb.c | 12 --- arch/arm64/kernel/kgdb.c| 12 --- arch/hexagon/kernel/kgdb.c | 32 --- arch/mips/kernel/kgdb.c | 9 +- arch/powerpc/kernel/kgdb.c | 6 ++-- arch/sh/kernel/kgdb.c | 12 --- arch/sparc/kernel/smp_64.c | 2 +- arch/x86/kernel/kgdb.c | 9 ++ include/linux/kgdb.h| 22 - kernel/debug/debug_core.c | 56 - kernel/debug/debug_core.h | 1 + kernel/debug/kdb/kdb_bt.c | 11 ++- kernel/debug/kdb/kdb_debugger.c | 7 - 14 files changed, 89 insertions(+), 112 deletions(-) -- 2.19.1.930.g4563a0d9d0-goog ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH v4 1/4] kgdb: Remove irq flags from roundup
The function kgdb_roundup_cpus() was passed a parameter that was documented as: > the flags that will be used when restoring the interrupts. There is > local_irq_save() call before kgdb_roundup_cpus(). Nobody used those flags. Anyone who wanted to temporarily turn on interrupts just did local_irq_enable() and local_irq_disable() without looking at them. So we can definitely remove the flags. Signed-off-by: Douglas Anderson --- Changes in v4: None Changes in v3: None Changes in v2: - Removing irq flags separated from fixing lockdep splat. arch/arc/kernel/kgdb.c | 2 +- arch/arm/kernel/kgdb.c | 2 +- arch/arm64/kernel/kgdb.c | 2 +- arch/hexagon/kernel/kgdb.c | 9 ++--- arch/mips/kernel/kgdb.c| 2 +- arch/powerpc/kernel/kgdb.c | 2 +- arch/sh/kernel/kgdb.c | 2 +- arch/sparc/kernel/smp_64.c | 2 +- arch/x86/kernel/kgdb.c | 9 ++--- include/linux/kgdb.h | 9 ++--- kernel/debug/debug_core.c | 2 +- 11 files changed, 14 insertions(+), 29 deletions(-) diff --git a/arch/arc/kernel/kgdb.c b/arch/arc/kernel/kgdb.c index 9a3c34af2ae8..0932851028e0 100644 --- a/arch/arc/kernel/kgdb.c +++ b/arch/arc/kernel/kgdb.c @@ -197,7 +197,7 @@ static void kgdb_call_nmi_hook(void *ignored) kgdb_nmicallback(raw_smp_processor_id(), NULL); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable(); smp_call_function(kgdb_call_nmi_hook, NULL, 0); diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index caa0dbe3dc61..f21077b077be 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c @@ -175,7 +175,7 @@ static void kgdb_call_nmi_hook(void *ignored) kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable(); smp_call_function(kgdb_call_nmi_hook, NULL, 0); diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index a20de58061a8..12c339ff6e75 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c @@ -289,7 +289,7 @@ static void kgdb_call_nmi_hook(void *ignored) kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable(); smp_call_function(kgdb_call_nmi_hook, NULL, 0); diff --git a/arch/hexagon/kernel/kgdb.c b/arch/hexagon/kernel/kgdb.c index 16c24b22d0b2..012e0e230ac2 100644 --- a/arch/hexagon/kernel/kgdb.c +++ b/arch/hexagon/kernel/kgdb.c @@ -119,17 +119,12 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) /** * kgdb_roundup_cpus - Get other CPUs into a holding pattern - * @flags: Current IRQ state * * On SMP systems, we need to get the attention of the other CPUs * and get them be in a known state. This should do what is needed * to get the other CPUs to call kgdb_wait(). Note that on some arches, * the NMI approach is not used for rounding up all the CPUs. For example, - * in case of MIPS, smp_call_function() is used to roundup CPUs. In - * this case, we have to make sure that interrupts are enabled before - * calling smp_call_function(). The argument to this function is - * the flags that will be used when restoring the interrupts. There is - * local_irq_save() call before kgdb_roundup_cpus(). + * in case of MIPS, smp_call_function() is used to roundup CPUs. * * On non-SMP systems, this is not called. */ @@ -139,7 +134,7 @@ static void hexagon_kgdb_nmi_hook(void *ignored) kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable(); smp_call_function(hexagon_kgdb_nmi_hook, NULL, 0); diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index eb6c0d582626..2b05effc17b4 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -219,7 +219,7 @@ static void kgdb_call_nmi_hook(void *ignored) set_fs(old_fs); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable(); smp_call_function(kgdb_call_nmi_hook, NULL, 0); diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index 59c578f865aa..b0e804844be0 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c @@ -124,7 +124,7 @@ static int kgdb_call_nmi_hook(struct pt_regs *regs) } #ifdef CONFIG_SMP -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { smp_send_debugger_break(); } diff --git a/arch/sh/kernel/kgdb.c b/arch/sh/kernel/kgdb.c index 4f04c6638a4d..cc57630f6bf2 100644 --- a/arch/sh/kernel/kgdb.c +++ b/arch/sh/kernel/kgdb.c @@ -319,7 +319,7 @@ static void kgdb_call_nmi_hook(void *ignored) kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); } -void kgdb_roundup_cpus(unsigned long flags) +void kgdb_roundup_cpus(void) { local_irq_enable();
[PATCH v4 2/4] kgdb: Fix kgdb_roundup_cpus() for arches who used smp_call_function()
When I had lockdep turned on and dropped into kgdb I got a nice splat on my system. Specifically it hit: DEBUG_LOCKS_WARN_ON(current->hardirq_context) Specifically it looked like this: sysrq: SysRq : DEBUG [ cut here ] DEBUG_LOCKS_WARN_ON(current->hardirq_context) WARNING: CPU: 0 PID: 0 at .../kernel/locking/lockdep.c:2875 lockdep_hardirqs_on+0xf0/0x160 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.0 #27 pstate: 604003c9 (nZCv DAIF +PAN -UAO) pc : lockdep_hardirqs_on+0xf0/0x160 ... Call trace: lockdep_hardirqs_on+0xf0/0x160 trace_hardirqs_on+0x188/0x1ac kgdb_roundup_cpus+0x14/0x3c kgdb_cpu_enter+0x53c/0x5cc kgdb_handle_exception+0x180/0x1d4 kgdb_compiled_brk_fn+0x30/0x3c brk_handler+0x134/0x178 do_debug_exception+0xfc/0x178 el1_dbg+0x18/0x78 kgdb_breakpoint+0x34/0x58 sysrq_handle_dbg+0x54/0x5c __handle_sysrq+0x114/0x21c handle_sysrq+0x30/0x3c qcom_geni_serial_isr+0x2dc/0x30c ... ... irq event stamp: ...45 hardirqs last enabled at (...44): [...] __do_softirq+0xd8/0x4e4 hardirqs last disabled at (...45): [...] el1_irq+0x74/0x130 softirqs last enabled at (...42): [...] _local_bh_enable+0x2c/0x34 softirqs last disabled at (...43): [...] irq_exit+0xa8/0x100 ---[ end trace adf21f830c46e638 ]--- Looking closely at it, it seems like a really bad idea to be calling local_irq_enable() in kgdb_roundup_cpus(). If nothing else that seems like it could violate spinlock semantics and cause a deadlock. Instead, let's use a private csd alongside smp_call_function_single_async() to round up the other CPUs. Using smp_call_function_single_async() doesn't require interrupts to be enabled so we can remove the offending bit of code. In order to avoid duplicating this across all the architectures that use the default kgdb_roundup_cpus(), we'll add a "weak" implementation to debug_core.c. Looking at all the people who previously had copies of this code, there were a few variants. I've attempted to keep the variants working like they used to. Specifically: * For arch/arc we passed NULL to kgdb_nmicallback() instead of get_irq_regs(). * For arch/mips there was a bit of extra code around kgdb_nmicallback() NOTE: In this patch we will still get into trouble if we try to round up a CPU that failed to round up before. We'll try to round it up again and potentially hang when we try to grab the csd lock. That's not new behavior but we'll still try to do better in a future patch. Suggested-by: Daniel Thompson Signed-off-by: Douglas Anderson --- Changes in v4: None Changes in v3: - No separate init call. - Don't round up the CPU that is doing the rounding up. - Add "#ifdef CONFIG_SMP" to match the rest of the file. - Updated desc saying we don't solve the "failed to roundup" case. - Document the ignored parameter. Changes in v2: - Removing irq flags separated from fixing lockdep splat. - Don't use smp_call_function (Daniel). arch/arc/kernel/kgdb.c | 10 ++ arch/arm/kernel/kgdb.c | 12 arch/arm64/kernel/kgdb.c | 12 arch/hexagon/kernel/kgdb.c | 27 --- arch/mips/kernel/kgdb.c| 9 + arch/powerpc/kernel/kgdb.c | 4 ++-- arch/sh/kernel/kgdb.c | 12 include/linux/kgdb.h | 15 +-- kernel/debug/debug_core.c | 35 +++ 9 files changed, 53 insertions(+), 83 deletions(-) diff --git a/arch/arc/kernel/kgdb.c b/arch/arc/kernel/kgdb.c index 0932851028e0..68d9fe4b5aa7 100644 --- a/arch/arc/kernel/kgdb.c +++ b/arch/arc/kernel/kgdb.c @@ -192,18 +192,12 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip) instruction_pointer(regs) = ip; } -static void kgdb_call_nmi_hook(void *ignored) +void kgdb_call_nmi_hook(void *ignored) { + /* Default implementation passes get_irq_regs() but we don't */ kgdb_nmicallback(raw_smp_processor_id(), NULL); } -void kgdb_roundup_cpus(void) -{ - local_irq_enable(); - smp_call_function(kgdb_call_nmi_hook, NULL, 0); - local_irq_disable(); -} - struct kgdb_arch arch_kgdb_ops = { /* breakpoint instruction: TRAP_S 0x3 */ #ifdef CONFIG_CPU_BIG_ENDIAN diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index f21077b077be..d9a69e941463 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c @@ -170,18 +170,6 @@ static struct undef_hook kgdb_compiled_brkpt_hook = { .fn = kgdb_compiled_brk_fn }; -static void kgdb_call_nmi_hook(void *ignored) -{ - kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); -} - -void kgdb_roundup_cpus(void) -{ - local_irq_enable(); - smp_call_function(kgdb_call_nmi_hook, NULL, 0); - local_irq_disable(); -} - static int __kgdb_notify(struct die_args *args, unsigned long cmd) { struct pt_regs *regs = args->regs; diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index 12c
Re: [PATCH v4 0/6] arm64: Get rid of __early_init_dt_declare_initrd()
On 11/6/18 6:06 AM, Mike Rapoport wrote: > On Mon, Nov 05, 2018 at 02:54:25PM -0800, Florian Fainelli wrote: >> Hi all, >> >> Changes in v4: >> >> - dropped initrd_below_start_ok assignment in ARM64, not necessary at >> all (Ard) >> - replace #ifdef CONFIG_BLK_DEV_INITRD with if >> (IS_ENABLED(CONFIG_BLK_DEV_INITRD) for consistency with other parts >> of arm64_memblock_init() (Rob) >> >> Changes in v3: >> >> - use C conditionals in drivers/of/fdt.c >> - added check on phys_initrd_size in arch/arm64/mm/init.c to determine >> whether initrd_start must be populated >> - fixed a build warning with ARC that was just missing an (unsigned >> long) cast >> >> Changes in v2: >> >> - get rid of ARCH_HAS_PHYS_INITRD and instead define >> phys_initrd_start/phys_initrd_size in init/do_mounts_initrd.c >> >> - make __early_init_dt_declare_initrd() account for ARM64 specific >> behavior with __va() when having CONFIG_DEBUG_VM enabled >> >> - consolidate early_initrd() command line parsing into >> init/do_mounts_initrd.c >> >> Because phys_initrd_start/phys_initrd_size are now compiled in >> ini/do_mounts_initrd.c which is only built with CONFIG_BLK_DEV_INITRD=y, >> we need to be a bit careful about the uses throughout architecture >> specific code. >> >> Previous discussions/submissions list here: >> >> v3: >> https://www.spinics.net/lists/arm-kernel/msg683566.html >> v2: >> https://lkml.org/lkml/2018/10/25/4 >> >> Florian Fainelli (6): >> nds32: Remove phys_initrd_start and phys_initrd_size >> arch: Make phys_initrd_start and phys_initrd_size global variables >> of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT >> arm64: Utilize phys_initrd_start/phys_initrd_size >> of/fdt: Remove custom __early_init_dt_declare_initrd() implementation >> arch: Move initrd= parsing into do_mounts_initrd.c > > For the series: > > Reviewed-by: Mike Rapoport Thanks Mike, Rob, do you want to merge that series through the OF tree? -- Florian ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] tcf-agent: Disable architecture-specific features for ARC
There's no support of architecture-specific features for ARC in tcf-agent, so disable non-generic stuff for now. Signed-off-by: Alexey Brodkin Cc: Richard Purdie Cc: Khem Raj --- meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb index d901c18c39..b4bd4ca63c 100644 --- a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb @@ -41,6 +41,7 @@ LCL_STOP_SERVICES = "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ # These features don't compile for several cases. # +CFLAGS_append_arc = " ${LCL_STOP_SERVICES}" CFLAGS_append_mips = " ${LCL_STOP_SERVICES}" CFLAGS_append_mips64 = " ${LCL_STOP_SERVICES}" CFLAGS_append_libc-musl = " ${LCL_STOP_SERVICES}" -- 2.16.2 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
[PATCH] locale: Allow usage of cross-localedef for ARC
With this it's possible to build locale data for ARC and not do it instead on the first boot. Signed-off-by: Alexey Brodkin --- meta/classes/libc-package.bbclass| 2 ++ meta/lib/oe/package_manager.py | 2 ++ meta/recipes-core/glibc/glibc-locale.inc | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 9d09c7be6a..4c694ab5e2 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass @@ -242,6 +242,8 @@ python package_do_split_gconvs () { if use_cross_localedef == "1": target_arch = d.getVar('TARGET_ARCH') locale_arch_options = { \ +"arc": " --uint32-align=4 --little-endian ", \ +"arceb": " --uint32-align=4 --big-endian ",\ "arm": " --uint32-align=4 --little-endian ", \ "armeb": " --uint32-align=4 --big-endian ",\ "aarch64": " --uint32-align=4 --little-endian ",\ diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 882e7c429f..aa4de6e7c3 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py @@ -94,6 +94,8 @@ def generate_locale_archive(d, rootfs, target_arch, localedir): # Pretty sure we don't need this for locale archive generation but # keeping it to be safe... locale_arch_options = { \ +"arc": ["--uint32-align=4", "--little-endian"], +"arceb": ["--uint32-align=4", "--big-endian"], "arm": ["--uint32-align=4", "--little-endian"], "armeb": ["--uint32-align=4", "--big-endian"], "aarch64": ["--uint32-align=4", "--little-endian"], diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc index 1b676dc26e..57b465dd5d 100644 --- a/meta/recipes-core/glibc/glibc-locale.inc +++ b/meta/recipes-core/glibc/glibc-locale.inc @@ -27,7 +27,7 @@ ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1" #enable locale generation on these arches # BINARY_LOCALE_ARCHES is a space separated list of regular expressions -BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64" +BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64" # set "1" to use cross-localedef for locale generation # set "0" for qemu emulation of native localedef for locale generation -- 2.16.2 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] locale: Allow usage of cross-localedef for ARC
On 11/12/18 2:44 PM, Alexey Brodkin wrote: > With this it's possible to build locale data for ARC > and not do it instead on the first boot. > > Signed-off-by: Alexey Brodkin > --- > meta/classes/libc-package.bbclass| 2 ++ > meta/lib/oe/package_manager.py | 2 ++ > meta/recipes-core/glibc/glibc-locale.inc | 2 +- > 3 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/meta/classes/libc-package.bbclass > b/meta/classes/libc-package.bbclass > index 9d09c7be6a..4c694ab5e2 100644 > --- a/meta/classes/libc-package.bbclass > +++ b/meta/classes/libc-package.bbclass > @@ -242,6 +242,8 @@ python package_do_split_gconvs () { > if use_cross_localedef == "1": > target_arch = d.getVar('TARGET_ARCH') > locale_arch_options = { \ > +"arc": " --uint32-align=4 --little-endian ", \ > +"arceb": " --uint32-align=4 --big-endian ",\ > "arm": " --uint32-align=4 --little-endian ", \ > "armeb": " --uint32-align=4 --big-endian ",\ > "aarch64": " --uint32-align=4 --little-endian ",\ > diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py > index 882e7c429f..aa4de6e7c3 100644 > --- a/meta/lib/oe/package_manager.py > +++ b/meta/lib/oe/package_manager.py > @@ -94,6 +94,8 @@ def generate_locale_archive(d, rootfs, target_arch, > localedir): > # Pretty sure we don't need this for locale archive generation but > # keeping it to be safe... > locale_arch_options = { \ > +"arc": ["--uint32-align=4", "--little-endian"], > +"arceb": ["--uint32-align=4", "--big-endian"], > "arm": ["--uint32-align=4", "--little-endian"], > "armeb": ["--uint32-align=4", "--big-endian"], > "aarch64": ["--uint32-align=4", "--little-endian"], > diff --git a/meta/recipes-core/glibc/glibc-locale.inc > b/meta/recipes-core/glibc/glibc-locale.inc > index 1b676dc26e..57b465dd5d 100644 > --- a/meta/recipes-core/glibc/glibc-locale.inc > +++ b/meta/recipes-core/glibc/glibc-locale.inc > @@ -27,7 +27,7 @@ ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = > "1" > > #enable locale generation on these arches > # BINARY_LOCALE_ARCHES is a space separated list of regular expressions > -BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 > riscv32 riscv64" > +BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips > mips64 riscv32 riscv64" > > # set "1" to use cross-localedef for locale generation > # set "0" for qemu emulation of native localedef for locale generation Interesting: How do we do that for other buildsystems / buildroot or when building by hand ? -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 0/6] arm64: Get rid of __early_init_dt_declare_initrd()
On Mon, Nov 12, 2018 at 12:32:50PM -0800, Florian Fainelli wrote: > On 11/6/18 6:06 AM, Mike Rapoport wrote: > > On Mon, Nov 05, 2018 at 02:54:25PM -0800, Florian Fainelli wrote: > >> Hi all, > >> > >> Changes in v4: > >> > >> - dropped initrd_below_start_ok assignment in ARM64, not necessary at > >> all (Ard) > >> - replace #ifdef CONFIG_BLK_DEV_INITRD with if > >> (IS_ENABLED(CONFIG_BLK_DEV_INITRD) for consistency with other parts > >> of arm64_memblock_init() (Rob) > >> > >> Changes in v3: > >> > >> - use C conditionals in drivers/of/fdt.c > >> - added check on phys_initrd_size in arch/arm64/mm/init.c to determine > >> whether initrd_start must be populated > >> - fixed a build warning with ARC that was just missing an (unsigned > >> long) cast > >> > >> Changes in v2: > >> > >> - get rid of ARCH_HAS_PHYS_INITRD and instead define > >> phys_initrd_start/phys_initrd_size in init/do_mounts_initrd.c > >> > >> - make __early_init_dt_declare_initrd() account for ARM64 specific > >> behavior with __va() when having CONFIG_DEBUG_VM enabled > >> > >> - consolidate early_initrd() command line parsing into > >> init/do_mounts_initrd.c > >> > >> Because phys_initrd_start/phys_initrd_size are now compiled in > >> ini/do_mounts_initrd.c which is only built with CONFIG_BLK_DEV_INITRD=y, > >> we need to be a bit careful about the uses throughout architecture > >> specific code. > >> > >> Previous discussions/submissions list here: > >> > >> v3: > >> https://www.spinics.net/lists/arm-kernel/msg683566.html > >> v2: > >> https://lkml.org/lkml/2018/10/25/4 > >> > >> Florian Fainelli (6): > >> nds32: Remove phys_initrd_start and phys_initrd_size > >> arch: Make phys_initrd_start and phys_initrd_size global variables > >> of/fdt: Populate phys_initrd_start/phys_initrd_size from FDT > >> arm64: Utilize phys_initrd_start/phys_initrd_size > >> of/fdt: Remove custom __early_init_dt_declare_initrd() implementation > >> arch: Move initrd= parsing into do_mounts_initrd.c > > > > For the series: > > > > Reviewed-by: Mike Rapoport > > Thanks Mike, Rob, do you want to merge that series through the OF tree? Sure, some arch maintainer acks would be nice. Rob ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
On 11/5/18 2:58 PM, Florian Fainelli wrote: > ARC, ARM, ARM64 and Unicore32 are all capable of parsing the "initrd=" > command line parameter to allow specifying the physical address and size > of an initrd. Move that parsing into init/do_mounts_initrd.c such that > we no longer duplicate that logic. > > Signed-off-by: Florian Fainelli > --- > arch/arc/mm/init.c | 25 + > arch/arm/mm/init.c | 17 - > arch/arm64/mm/init.c | 18 -- > arch/unicore32/mm/init.c | 18 -- > init/do_mounts_initrd.c | 17 + > 5 files changed, 22 insertions(+), 73 deletions(-) > > diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c > index f8fe5668b30f..43bf4c3a1290 100644 > --- a/arch/arc/mm/init.c > +++ b/arch/arc/mm/init.c > @@ -78,24 +78,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 > size) > base, TO_MB(size), !in_use ? "Not used":""); > } > > -#ifdef CONFIG_BLK_DEV_INITRD > -static int __init early_initrd(char *p) > -{ > - unsigned long start, size; > - char *endp; > - > - start = memparse(p, &endp); > - if (*endp == ',') { > - size = memparse(endp + 1, NULL); > - > - initrd_start = (unsigned long)__va(start); > - initrd_end = (unsigned long)__va(start + size); > - } > - return 0; > -} > -early_param("initrd", early_initrd); > -#endif > - > /* > * First memory setup routine called from setup_arch() > * 1. setup swapper's mm @init_mm > @@ -140,8 +122,11 @@ void __init setup_arch_memory(void) > memblock_reserve(low_mem_start, __pa(_end) - low_mem_start); > > #ifdef CONFIG_BLK_DEV_INITRD > - if (initrd_start) > - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); > + if (phys_initrd_size) { > + memblock_reserve(phys_initrd_start, phys_initrd_size); > + initrd_start = (unsigned long)__va(phys_initrd_start); > + initrd_end = initrd_start + phys_initrd_size; > + } > #endif The common code now uses phys_initrd*, and you also use the same in ARC code, do we still need the initrd_* setting here ? ARC semantics was using them as PA anyways. [snip]... > /* > * This keeps memory configuration data used by a couple memory > * initialization functions, as well as show_mem() for the skipping > diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c > index 45865b72f4ea..732d21f4a637 100644 > --- a/init/do_mounts_initrd.c > +++ b/init/do_mounts_initrd.c > @@ -27,6 +27,23 @@ static int __init no_initrd(char *str) > > __setup("noinitrd", no_initrd); > > +static int __init early_initrd(char *p) > +{ > + phys_addr_t start; > + unsigned long size; > + char *endp; > + > + start = memparse(p, &endp); > + if (*endp == ',') { > + size = memparse(endp + 1, NULL); > + > + phys_initrd_start = start; > + phys_initrd_size = size; > + } > + return 0; > +} > +early_param("initrd", early_initrd); > + > static int init_linuxrc(struct subprocess_info *info, struct cred *new) > { > ksys_unshare(CLONE_FS | CLONE_FILES); ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
On 11/12/18 4:34 PM, Vineet Gupta wrote: > On 11/5/18 2:58 PM, Florian Fainelli wrote: >> ARC, ARM, ARM64 and Unicore32 are all capable of parsing the "initrd=" >> command line parameter to allow specifying the physical address and size >> of an initrd. Move that parsing into init/do_mounts_initrd.c such that >> we no longer duplicate that logic. >> >> Signed-off-by: Florian Fainelli >> --- >> arch/arc/mm/init.c | 25 + >> arch/arm/mm/init.c | 17 - >> arch/arm64/mm/init.c | 18 -- >> arch/unicore32/mm/init.c | 18 -- >> init/do_mounts_initrd.c | 17 + >> 5 files changed, 22 insertions(+), 73 deletions(-) >> >> diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c >> index f8fe5668b30f..43bf4c3a1290 100644 >> --- a/arch/arc/mm/init.c >> +++ b/arch/arc/mm/init.c >> @@ -78,24 +78,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 >> size) >> base, TO_MB(size), !in_use ? "Not used":""); >> } >> >> -#ifdef CONFIG_BLK_DEV_INITRD >> -static int __init early_initrd(char *p) >> -{ >> -unsigned long start, size; >> -char *endp; >> - >> -start = memparse(p, &endp); >> -if (*endp == ',') { >> -size = memparse(endp + 1, NULL); >> - >> -initrd_start = (unsigned long)__va(start); >> -initrd_end = (unsigned long)__va(start + size); >> -} >> -return 0; >> -} >> -early_param("initrd", early_initrd); >> -#endif >> - >> /* >> * First memory setup routine called from setup_arch() >> * 1. setup swapper's mm @init_mm >> @@ -140,8 +122,11 @@ void __init setup_arch_memory(void) >> memblock_reserve(low_mem_start, __pa(_end) - low_mem_start); >> >> #ifdef CONFIG_BLK_DEV_INITRD >> -if (initrd_start) >> -memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); >> +if (phys_initrd_size) { >> +memblock_reserve(phys_initrd_start, phys_initrd_size); >> +initrd_start = (unsigned long)__va(phys_initrd_start); >> +initrd_end = initrd_start + phys_initrd_size; >> +} >> #endif > > The common code now uses phys_initrd*, and you also use the same in ARC code, > do > we still need the initrd_* setting here ? > ARC semantics was using them as PA anyways. Yes, the generic initrd code expects initrd_start/end to be virtual addresses, which we now directly derive from phys_initrd_start, that should really be equivalent. -- Florian ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
On 11/12/18 4:40 PM, Vineet Gupta wrote: > On 11/12/18 4:38 PM, Florian Fainelli wrote: #ifdef CONFIG_BLK_DEV_INITRD - if (initrd_start) - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); + if (phys_initrd_size) { + memblock_reserve(phys_initrd_start, phys_initrd_size); + initrd_start = (unsigned long)__va(phys_initrd_start); + initrd_end = initrd_start + phys_initrd_size; + } #endif >>> The common code now uses phys_initrd*, and you also use the same in ARC >>> code, do >>> we still need the initrd_* setting here ? >>> ARC semantics was using them as PA anyways. >> Yes, the generic initrd code expects initrd_start/end to be virtual >> addresses, which we now directly derive from phys_initrd_start, that >> should really be equivalent. > > So we can skip this explicit setting above - ARC arch code doesn't access the > virt > initrd_start OK, you are saying we could just have the generic initrd code do this assignment instead of having each architecture do it, is that a correct understanding? If so, I suppose it could be done, whether as of this patch series or as a follow-up, either way is fine with me. One possible caveat is if __va() and __phys_to_virt() behave differently (e.g: because of CONFIG_DEBUG_VIRTUAL or other things). -- Florian ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
On 11/12/18 4:38 PM, Florian Fainelli wrote: >>> #ifdef CONFIG_BLK_DEV_INITRD >>> - if (initrd_start) >>> - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); >>> + if (phys_initrd_size) { >>> + memblock_reserve(phys_initrd_start, phys_initrd_size); >>> + initrd_start = (unsigned long)__va(phys_initrd_start); >>> + initrd_end = initrd_start + phys_initrd_size; >>> + } >>> #endif >> The common code now uses phys_initrd*, and you also use the same in ARC >> code, do >> we still need the initrd_* setting here ? >> ARC semantics was using them as PA anyways. > Yes, the generic initrd code expects initrd_start/end to be virtual > addresses, which we now directly derive from phys_initrd_start, that > should really be equivalent. So we can skip this explicit setting above - ARC arch code doesn't access the virt initrd_start ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v4 6/6] arch: Move initrd= parsing into do_mounts_initrd.c
On 11/12/18 4:52 PM, Florian Fainelli wrote: > On 11/12/18 4:40 PM, Vineet Gupta wrote: >> On 11/12/18 4:38 PM, Florian Fainelli wrote: > #ifdef CONFIG_BLK_DEV_INITRD > - if (initrd_start) > - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); > + if (phys_initrd_size) { > + memblock_reserve(phys_initrd_start, phys_initrd_size); > + initrd_start = (unsigned long)__va(phys_initrd_start); > + initrd_end = initrd_start + phys_initrd_size; > + } > #endif The common code now uses phys_initrd*, and you also use the same in ARC code, do we still need the initrd_* setting here ? ARC semantics was using them as PA anyways. >>> Yes, the generic initrd code expects initrd_start/end to be virtual >>> addresses, which we now directly derive from phys_initrd_start, that >>> should really be equivalent. >> So we can skip this explicit setting above - ARC arch code doesn't access >> the virt >> initrd_start > OK, you are saying we could just have the generic initrd code do this > assignment instead of having each architecture do it, is that a correct > understanding? Correct ! > If so, I suppose it could be done, whether as of this > patch series or as a follow-up, either way is fine with me. If it is not too much trouble, I'd prefer this now. I should have chimed earlier. > One possible caveat is if __va() and __phys_to_virt() behave differently > (e.g: because of CONFIG_DEBUG_VIRTUAL or other things). Thing is, after your patches, we don't use the vanilla initrd_xxx in arch code any longer. So this becomes just an implementation detail, which core code may or maynot need and if it does, this needs to work already w/o having to set anything in arch code. Agree ? Thx, -Vineet ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc