Synopsys ARC Linux kernel Port
Subsystems (13)
Re: [PATCH v2 69/76] ARC: [Review] Multi-platform image #2: Board callback Infrastructure
In reply to Vineet GuptaQuoted 17 lines · Vineet Gupta
The orig platform code orgnaization was singleton design pattern - only one platform (and board thereof) would build at a time.
Thus any platform/board specific code (e.g. irq init, early init ...) expected by ARC common code was exported as well defined set of APIs, with only ONE instance building ever.
Now with multiple-platform build requirement, that design of code no longer holds - multiple board specific calls need to build at the same time - so ARC common code can't use the API approach, it needs a callback based design where each board registers it's specific set of functions, and at runtime, depending on board detection, the callbacks are used from the registry.
This commit adds all the infrastructure, where board specific callbacks are specified as a "machine description".
Quoted 7 lines
All the hooks are placed in right spots, no board callbacks registered yet (with MACHINE_STARt/END constructs) so the hooks will not run.
Next commit will actually convert the platform to this infrastructure.
Signed-off-by Vineet Gupta <[email protected]>Cc Arnd Bergmann <[email protected]>
arch/arc/include/asm/mach_desc.h line 48
Quoted 13 lines
arch/arc/include/asm/mach_desc.h new file +13
-0+struct machine_desc { +const char *name; +const char **dt_compat; + +void (*init_early)(void ); +void (*init_irq)(void ); +void (*init_time)(void ); +void (*init_machine)(void ); +void (*init_late)(void ); + +#ifdef CONFIG_SMP +void (*init_smp)(unsigned int ); +#endif
On ARM, it turned out helpful to list these in the order in which they get called. I assume that at least init_smp is currently not in that order.
Also, we are slowly making some of these obsolete on
ARM: For platforms that at DT-only, the timer and irq code is now in drivers/irqchip and drivers/clocksource and can get automatically initialized.
It probably makese sense for you to keep the above structure for now, but you can also think about obsoleting some of the calls in the future. It may be a good idea to have a default version for each of these but still allow overriding them for maximum flexibility in the platform.
Arnd
Re: [PATCH v2 69/76] ARC: [Review] Multi-platform image #2: Board callback Infrastructure
Quoted 17 lines · Arnd Bergmann
arch/arc/include/asm/mach_desc.h line 48
Quoted 13 lines · Vineet Gupta
arch/arc/include/asm/mach_desc.h new file +13
-0+struct machine_desc { +const char *name; +const char **dt_compat; + +void (*init_early)(void ); +void (*init_irq)(void ); +void (*init_time)(void ); +void (*init_machine)(void ); +void (*init_late)(void ); + +#ifdef CONFIG_SMP +void (*init_smp)(unsigned int ); +#endif On ARM, it turned out helpful to list these in the order in which they get called. I assume that at least
init_smpis currently not in that order.
Rightly so, which is fixed now. I also kept forgetting hence the big comment above actually describes the exact location from where the callback is invoked. Note that init_smp is called for each cpu.
Quoted 4 lines
Also, we are slowly making some of these obsolete on
ARM: For platforms that at DT-only, the timer and irq code is now indrivers/irqchipanddrivers/clocksourceand can get automatically initialized.
OK - I'll make a note. BTW init_time was a recent addition, the reason being it's timing. For registering a clocksource, init_irq and init_smp are too early (timekeeping not yet up) while init_machine (arch initcall) seemed too late - but thinking again, it could well be done in there. I need to check with the relevant platform folks.
Quoted 7 lines
It probably makese sense for you to keep the above structure for now, but you can also think about obsoleting some of the calls in the future. It may be a good idea to have a default version for each of these but still allow overriding them for maximum flexibility in the platform.
Arnd
IMHO the default has to be NULL, unless the platform has a quirk. It would be cleaner (and easier to read) if any default was factored out into ARC common code.
-Vineet
Arnd Bergmann
maintainerRe: [PATCH v2 69/76] ARC: [Review] Multi-platform image #2: Board callback Infrastructure
Quoted 5 lines · Vineet Gupta
OK - I'll make a note. BTW
init_timewas a recent addition, the reason being it's timing. For registering a clocksource,init_irqandinit_smpare too early (timekeeping not yet up) whileinit_machine(arch initcall) seemed too late - but thinking again, it could well be done in there. I need to check with the relevant platform folks.
For linux-3.9, we're adding support to drivers/clocksource to keep the individual clocksource drivers separate from the platform (on ARM). If you follow the same model, you can just call the global clocksource init function from arch code and it will find the right timer from the device tree, rather than having to list it per platform.
Quoted 8 lines
Quoted 5 lines
It probably makese sense for you to keep the above structure for now, but you can also think about obsoleting some of the calls in the future. It may be a good idea to have a default version for each of these but still allow overriding them for maximum flexibility in the platform.
IMHO the default has to be NULL, unless the platform has a quirk. It would be cleaner (and easier to read) if any default was factored out into ARC common code.
Yes, that's what I meant.
Arnd
PATCH v2 70/76 ARC: [Review] Multi-platform image #3: switch to board callback
In reply to Vineet Gupta-platform API is retired and instead callbacks are used
--- arch/arc/include/asm/irq.h | 1 - arch/arc/include/asm/smp.h | 5 --- arch/arc/kernel/irq.c | 2 - arch/arc/kernel/setup.c | 5 --- arch/arc/kernel/smp.c | 1 - arch/arc/plat-arcfpga/include/plat/irq.h | 2 + arch/arc/plat-arcfpga/include/plat/smp.h | 2 + arch/arc/plat-arcfpga/irq.c | 2 +- arch/arc/plat-arcfpga/platform.c | 50 +++++++++++++++++++++++++----- arch/arc/plat-arcfpga/smp.c | 4 +-- 10 files changed, 48 insertions(+), 26 deletions(-)
arch/arc/include/asm/irq.h +0 -1
@@ -17,7 +17,6 @@#include <asm-generic/irq.h> extern void __init arc_init_IRQ (void ); -extern void __init plat_init_IRQ (void );extern int __init get_hw_config_num_irq (void );void __cpuinit arc_local_timer_setup (unsigned int cpu);
arch/arc/include/asm/smp.h +0 -5
@@ -46,10 +46,6 @@ extern int smp_ipi_irq_setup(int cpu, int irq);* arc_platform_smp_cpuinfo: * returns a string containing info for /proc/cpuinfo * -* arc_platform_smp_init_cpu: -* Called from start_kernel_secondary to do any CPU local setup -* such as starting a timer, setting up IPI etc -* * arc_platform_smp_wait_to_boot: * Called from early bootup code for non-Master CPUs to "park" them *
@@ -64,7 +60,6 @@ extern int smp_ipi_irq_setup(int cpu, int irq);* Takes @cpu which got IPI at @irq to do any IPI clearing */ extern const char *arc_platform_smp_cpuinfo (void ); -extern void arc_platform_smp_init_cpu (void );extern void arc_platform_smp_wait_to_boot (int cpu);extern void arc_platform_smp_wakeup_cpu (int cpu,unsigned long pc);extern void arc_platform_ipi_send (const struct cpumask *callmap);
arch/arc/kernel/irq.c +0 -2
@@ -124,7 +124,6 @@ void __init init_onchip_IRQ(void)void __init init_IRQ (void ) {init_onchip_IRQ (); -plat_init_IRQ ();/* Any external intc can be setup here */ if (machine_desc->init_irq)
@@ -132,7 +131,6 @@ void __init init_IRQ(void)#ifdef CONFIG_SMP /* Master CPU can initialize it's side of IPI */ -arc_platform_smp_init_cpu ();if (machine_desc->init_smp) machine_desc->init_smp (smp_processor_id ());#endif
arch/arc/kernel/setup.c +0 -5
@@ -319,10 +319,6 @@ void __init setup_processor(void)arc_chk_fpu (); } -void __init __attribute__((weak))arc_platform_early_init (void ) -{ -} -void __init setup_arch (char **cmdline_p) {#ifdef CONFIG_CMDLINE_UBOOT
@@ -347,7 +343,6 @@ void __init setup_arch(char **cmdline_p)parse_early_param ();/* Platform/board specific: e.g. early console registration */ -arc_platform_early_init ();if (machine_desc->init_early) machine_desc->init_early ();
arch/arc/kernel/smp.c +0 -1
@@ -126,7 +126,6 @@ void __cpuinit start_kernel_secondary(void)pr_info ("## CPU%u LIVE ##: Executing Code...\n" , cpu); -arc_platform_smp_init_cpu ();if (machine_desc->init_smp) machine_desc->init_smp (smp_processor_id ());
arch/arc/plat-arcfpga/include/plat/irq.h +2 -0
@@ -32,4 +32,6 @@#define IDU_INTERRUPT_0 16#endif +extern void __init plat_fpga_init_IRQ (void ); +#endif
arch/arc/plat-arcfpga/include/plat/smp.h +2 -0
@@ -110,6 +110,8 @@ struct idu_irq_status {extern void idu_irq_set_tgtcpu (uint8_t irq,uint32_t mask);extern void idu_irq_set_mode (uint8_t irq,uint8_t dest_mode,uint8_t trig_mode); +extern void iss_model_init_smp (unsigned int cpu); +#endif /* CONFIG_SMP */ #endif
arch/arc/plat-arcfpga/irq.c +1 -1
@@ -11,7 +11,7 @@#include <linux/interrupt.h> #include <asm/irq.h> -void __init plat_init_IRQ (void ) +void __init plat_fpga_init_IRQ (void ) {/* * SMP Hack because UART IRQ hardwired to cpu0 (boot-cpu) but if the
arch/arc/plat-arcfpga/platform.c +42 -8
73 lines not on this page · raw message
arch/arc/plat-arcfpga/smp.c +1 -3
@@ -63,10 +63,8 @@ void arc_platform_smp_wakeup_cpu(int cpu, unsigned long pc)* -Master : init_IRQ() * -Other(s) : start_kernel_secondary() */ -void arc_platform_smp_init_cpu (void ) +void iss_model_init_smp (unsigned int cpu) { -int cpu =smp_processor_id (); -/* Check if CPU is configured for more than 16 interrupts */ if (NR_IRQS <=16 ||get_hw_config_num_irq () <=16 )panic ("[arcfpga] IRQ system can't support IDU IPI\n" );
Signature · 1 line
1.7.4.1
Re: [PATCH v2 70/76] ARC: [Review] Multi-platform image #3: switch to board callback
Quoted 3 lines · Vineet Gupta
-platform API is retired and instead callbacks are used
Signed-off-by Vineet Gupta <[email protected]>
PATCH v2 71/76 ARC: [Review] Multi-platform image #4: Isolate platform headers
In reply to Vineet Gupta-Top level ARC makefile removes -I for platform headers -asm/irq.h no longer includes plat/irq.h
-platform makefile adds -I for it's specfic platform headers -platform code to directly include it's plat/irq.h
-Linker script needed plat/memmap.h for CCM info, already in .config
--- arch/arc/Makefile | 16 +--------------- arch/arc/include/asm/irq.h | 1 - arch/arc/kernel/vmlinux.lds.S | 1 - arch/arc/plat-arcfpga/Makefile | 2 ++ arch/arc/plat-arcfpga/irq.c | 2 +- arch/arc/plat-arcfpga/platform.c | 2 +- arch/arc/plat-arcfpga/smp.c | 3 ++- 7 files changed, 7 insertions(+), 20 deletions(-)
arch/arc/Makefile +1 -15
@@ -10,14 +10,6 @@ UTS_MACHINE := arc KBUILD_DEFCONFIG := fpga_defconfig -# For ARC FPGA Platforms -platform-$(CONFIG_ARC_PLAT_FPGA_LEGACY) := arcfpga -#New platform adds here - -PLATFORM := $(platform-y) -export PLATFORM - -cflags-y += -Iarch/arc/plat-$(PLATFORM)/include cflags-y += -mA7 -fno-common -pipe -fno-builtin -D__linux__ LINUXINCLUDE += -include ${src}/arch/arc/include/asm/defines.h
@@ -86,9 +78,6 @@ KBUILD_CFLAGS += $(cflags-y) KBUILD_AFLAGS += $(KBUILD_CFLAGS) LDFLAGS += $(ldflags-y) -# Needed for Linker script preprocessing -KBUILD_CPPFLAGS += -Iarch/arc/plat-$(PLATFORM)/include - head-y := arch/arc/kernel/head.o # See arch/arc/Kbuild for content of core part of the kernel
@@ -97,10 +86,7 @@ core-y += arch/arc/ # w/o this dtb won't embed into kernel binary core-y += arch/arc/boot/dtb/ -# w/o this ifneq, make ARCH=arc clean was crapping out -ifneq ($(platform-y),) -core-y += arch/arc/plat-$(PLATFORM)/ -endif +core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/ drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/
arch/arc/include/asm/irq.h +0 -1
@@ -13,7 +13,6 @@#define TIMER0_IRQ 3#define TIMER1_IRQ 4 -#include <plat/irq.h> /* Board Specific IRQ assignments */ #include <asm-generic/irq.h> extern void __init arc_init_IRQ (void );
arch/arc/kernel/vmlinux.lds.S +0 -1
@@ -11,7 +11,6 @@ #include <asm/cache.h> #include <asm/page.h> #include <asm/thread_info.h> -#include <plat/memmap.h> OUTPUT_ARCH(arc) ENTRY(_stext)
arch/arc/plat-arcfpga/Makefile +2 -0
@@ -6,5 +6,7 @@ # published by the Free Software Foundation. # +KBUILD_CFLAGS += -Iarch/arc/plat-arcfpga/include + obj-y := platform.o irq.o obj-$(CONFIG_SMP) += smp.o
arch/arc/plat-arcfpga/irq.c +1 -1
@@ -9,7 +9,7 @@*/ #include <linux/interrupt.h> -#include <asm/irq.h> +#include <plat/irq.h> void __init plat_fpga_init_IRQ (void ) {
arch/arc/plat-arcfpga/platform.c +1 -1
@@ -16,11 +16,11 @@#include <linux/console.h> #include <linux/of_platform.h> #include <asm/setup.h> -#include <asm/irq.h> #include <asm/clk.h> #include <asm/mach_desc.h> #include <plat/memmap.h> #include <plat/smp.h> +#include <plat/irq.h> /*-----------------------BVCI Latency Unit -----------------------------*/
arch/arc/plat-arcfpga/smp.c +2 -1
@@ -12,7 +12,8 @@*/ #include <linux/smp.h> -#include <asm/irq.h> +#include <linux/irq.h> +#include <plat/irq.h> #include <plat/smp.h> static char smp_cpuinfo_buf[128 ];
Signature · 1 line
1.7.4.1
Re: [PATCH v2 71/76] ARC: [Review] Multi-platform image #4: Isolate platform headers
Quoted 10 lines · Vineet Gupta
(quoted diff) +0
-5-Top level ARC makefile removes -I for platform headers -asm/irq.h no longer includes plat/irq.h -platform makefile adds -I for it's specfic platform headers -platform code to directly include it's plat/irq.h -Linker script needed plat/memmap.h for CCM info, already in .configSigned-off-by Vineet Gupta <[email protected]>Cc Arnd Bergmann <[email protected]>
PATCH v2 72/76 ARC: [Review] Multi-platform image #5: NR_IRQS defined by ARC core
In reply to Vineet GuptaFor now this will suffice for all platforms, later exotic ones needs to get this from DeviceTree
--- arch/arc/include/asm/irq.h | 2 ++ arch/arc/plat-arcfpga/include/plat/irq.h | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-)
arch/arc/include/asm/irq.h +2 -0
@@ -9,6 +9,8 @@#ifndef __ASM_ARC_IRQ_H#define __ASM_ARC_IRQ_H +#define NR_IRQS 32 +/* Platform Independent IRQs */ #define TIMER0_IRQ 3#define TIMER1_IRQ 4
arch/arc/plat-arcfpga/include/plat/irq.h +0 -6
@@ -12,12 +12,6 @@#ifndef __PLAT_IRQ_H#define __PLAT_IRQ_H -#ifdef CONFIG_SMP -#define NR_IRQS 32 -#else -#define NR_IRQS 16 -#endif -#define UART0_IRQ 5#define UART1_IRQ 10#define UART2_IRQ 11
Signature · 1 line
1.7.4.1
PATCH v2 73/76 ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional
All the current platforms can work with 0x8000_0000 based dma_addr_t since the Bus Bridges typically ignore the top bit (the only excpetion was Angel4 PCI-AHM bridge which we no longer care for). That way we don't need plat-specific cpu-addr to bus-addr conversion.
Hooks still provided - just in case a platform has an obscure device which say needs 0 based bus address.
That way <asm/dma_mapping.h> no longer needs to unconditinally include <plat/dma_addr.h>
Also verfied that on Angel4 board, other peripherals (IDE-disk / EMAC) work fine with 0x8000_0000 based dma addresses.
--- arch/arc/Kconfig | 4 ++ arch/arc/include/asm/dma-mapping.h | 16 +++++++++ arch/arc/plat-arcfpga/include/plat/dma_addr.h | 45 ------------------------- 3 files changed, 20 insertions(+), 45 deletions(-) delete mode 100644 arch/arc/plat-arcfpga/include/plat/dma_addr.h
arch/arc/Kconfig +4 -0
@@ -119,6 +119,10 @@ config CPU_BIG_ENDIAN help Build kernel for Big Endian Mode of ARC CPU +# If a platform can't work with 0x8000_0000 based dma_addr_t +config ARC_PLAT_NEEDS_CPU_TO_DMA + bool + # If a plat can do IPI, same core(s) can do minimal SMP config ARC_HAS_IPI bool
arch/arc/include/asm/dma-mapping.h +16 -0
@@ -13,7 +13,23 @@#include <asm-generic/dma-coherent.h> #include <asm/cacheflush.h> + +#ifndef CONFIG_ARC_PLAT_NEEDS_CPU_TO_DMA +/* +* dma_map_* API take cpu addresses, which is kernel logical address in the +* untranslated address space (0x8000_0000) based. The dma address (bus addr) +* ideally needs to be 0x0000_0000 based hence these glue routines. +* However given that intermediate bus bridges can ignore the high bit, we can +* do with these routines being no-ops. +* If a platform/device comes up which sriclty requires 0 based bus addr +* (e.g. AHB-PCI bridge on Angel4 board), then it can provide it's own versions +*/ +#define plat_dma_addr_to_kernel (dev, addr) ((unsigned long)(addr)) +#define plat_kernel_addr_to_dma (dev, ptr) ((dma_addr_t)(ptr)) + +#else #include <plat/dma_addr.h> +#endif void *dma_alloc_noncoherent (struct device *dev,size_t size,dma_addr_t *dma_handle,gfp_t gfp);
arch/arc/plat-arcfpga/include/plat/dma_addr.h deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH v2 73/76] ARC: [Review] Multi-platform image #6: cpu-to-dma-addr optional
Quoted 8 lines · Vineet Gupta
All the current platforms can work with 0x8000_0000 based
dma_addr_tsince the Bus Bridges typically ignore the top bit (the only excpetion was Angel4 PCI-AHM bridge which we no longer care for). That way we don't need plat-specific cpu-addr to bus-addr conversion.Hooks still provided - just in case a platform has an obscure device which say needs 0 based bus address.
Quoted 8 lines
That way <
asm/dma_mapping.h> no longer needs to unconditinally include <plat/dma_addr.h>Also verfied that on Angel4 board, other peripherals (IDE-disk / EMAC) work fine with 0x8000_0000 based dma addresses.
Signed-off-by Vineet Gupta <[email protected]>Cc Arnd Bergmann <[email protected]>
PATCH v2 74/76 ARC: [Review] Multi-platform image #7: SMP common code to use callbacks
In reply to Vineet GuptaThis again is for switch from singleton platform SMP API to multi-platform paradigm
Platform code is not yet setup to populate the callbacks, that happens in next commit
--- arch/arc/include/asm/smp.h | 36 +++++++++++++++--------------------- arch/arc/kernel/smp.c | 16 +++++++++++++--- 2 files changed, 28 insertions(+), 24 deletions(-)
arch/arc/include/asm/smp.h +15 -21
@@ -31,6 +31,7 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);*/ extern void __init smp_init_cpus (void );extern void __init first_lines_of_secondary (void ); +extern const char *arc_platform_smp_cpuinfo (void );/* * API expected BY platform smp code (FROM arch smp code)
@@ -41,29 +42,22 @@ extern void __init first_lines_of_secondary(void);extern int smp_ipi_irq_setup (int cpu,int irq);/* -* APIs expected FROM platform smp code -* -* arc_platform_smp_cpuinfo: -* returns a string containing info for /proc/cpuinfo -* -* arc_platform_smp_wait_to_boot: -* Called from early bootup code for non-Master CPUs to "park" them +* struct plat_smp_ops - SMP callbacks provided by platform to ARC SMP * -* arc_platform_smp_wakeup_cpu: -* Called from __cpu_up (Master CPU) to kick start another one -* -* arc_platform_ipi_send: -* Takes @cpumask to which IPI(s) would be sent. -* The actual msg-id/buffer is manager in arch-common code -* -* arc_platform_ipi_clear: -* Takes @cpu which got IPI at @irq to do any IPI clearing +* @info: SoC SMP specific info for /proc/cpuinfo etc +* @cpu_kick: For Master to kickstart a cpu (optionally at a PC) +* @ipi_send: To send IPI to a @cpumask +* @ips_clear: To clear IPI received by @cpu at @irq */ -extern const char *arc_platform_smp_cpuinfo (void ); -extern void arc_platform_smp_wait_to_boot (int cpu); -extern void arc_platform_smp_wakeup_cpu (int cpu,unsigned long pc); -extern void arc_platform_ipi_send (const struct cpumask *callmap); -extern void arc_platform_ipi_clear (int cpu,int irq); +struct plat_smp_ops { +const char *info; +void (*cpu_kick)(int cpu,unsigned long pc); +void (*ipi_send)(void *callmap); +void (*ipi_clear)(int cpu,int irq); +}; + +/* TBD: stop exporting it for direct population by platform */ +extern struct plat_smp_ops plat_smp_ops;#endif /* CONFIG_SMP */
arch/arc/kernel/smp.c +13 -3
@@ -37,6 +37,8 @@arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED;arch_spinlock_t smp_bitops_lock = __ARCH_SPIN_LOCK_UNLOCKED; +struct plat_smp_ops plat_smp_ops; +/* XXX: per cpu ? Only needed once in early seconday boot */ struct task_struct *secondary_idle_tsk;
@@ -105,6 +107,11 @@ void __attribute__((weak)) arc_platform_smp_wait_to_boot(int cpu) " b 1b \n"); } +const char *arc_platform_smp_cpuinfo (void ) +{ +return plat_smp_ops.info; +} +/* * The very first "C" code executed by secondary * Called from asm stub in head.S
@@ -155,7 +162,8 @@ int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle)pr_info ("Idle Task [%d] %p" , cpu, idle);pr_info ("Trying to bring up CPU%u ...\n" , cpu); -arc_platform_smp_wakeup_cpu (cpu, +if (plat_smp_ops.cpu_kick) + plat_smp_ops.cpu_kick (cpu, (unsigned long )first_lines_of_secondary);/* wait for 1 sec after kicking the secondary */
@@ -224,7 +232,8 @@ static void ipi_send_msg(const struct cpumask *callmap, enum ipi_msg_type msg) }/* Call the platform specific cross-CPU call function */ -arc_platform_ipi_send (callmap); +if (plat_smp_ops.ipi_send) + plat_smp_ops.ipi_send ((void *)callmap);local_irq_restore (flags); }
@@ -298,7 +307,8 @@ irqreturn_t do_IPI(int irq, void *dev_id)struct ipi_data *ipi = &per_cpu (ipi_data, cpu);unsigned long ops; -arc_platform_ipi_clear (cpu, irq); +if (plat_smp_ops.ipi_clear) + plat_smp_ops.ipi_clear (cpu, irq);/* * XXX: is this loop really needed
Signature · 1 line
1.7.4.1
Re: [PATCH v2 74/76] ARC: [Review] Multi-platform image #7: SMP common code to use callbacks
Quoted 8 lines · Vineet Gupta
This again is for switch from singleton platform SMP API to multi-platform paradigm
Platform code is not yet setup to populate the callbacks, that happens in next commit
Signed-off-by Vineet Gupta <[email protected]>Cc Arnd Bergmann <[email protected]>
PATCH v2 75/76 ARC: [Review] Multi-platform image #8: platform registers SMP callbacks
In reply to Vineet GuptaPlatforms export their SMP callbacks by populating arc_smp_ops. The population itself needs to be done pretty early, from init_early callback.
--- arch/arc/plat-arcfpga/include/plat/smp.h | 1 + arch/arc/plat-arcfpga/platform.c | 4 +++ arch/arc/plat-arcfpga/smp.c | 41 ++++++++++++++++------------- 3 files changed, 28 insertions(+), 18 deletions(-)
arch/arc/plat-arcfpga/include/plat/smp.h +1 -0
@@ -111,6 +111,7 @@ extern void idu_irq_set_tgtcpu(uint8_t irq, uint32_t mask);extern void idu_irq_set_mode (uint8_t irq,uint8_t dest_mode,uint8_t trig_mode);extern void iss_model_init_smp (unsigned int cpu); +extern void iss_model_init_early_smp (void );#endif /* CONFIG_SMP */
arch/arc/plat-arcfpga/platform.c +4 -0
@@ -171,6 +171,10 @@ static void __init plat_fpga_early_init(void)setup_bvci_lat_unit ();arc_fpga_serial_init (); + +#ifdef CONFIG_SMP +iss_model_init_early_smp (); +#endif }static struct of_dev_auxdata plat_auxdata_lookup[]__initdata = {
arch/arc/plat-arcfpga/smp.c +23 -18
67 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH v2 76/76 ARC: [plat-arcfpga] defconfig for fully loaded ARC Linux
In reply to Vineet Gupta--- arch/arc/configs/fpga_defconfig | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
arch/arc/configs/fpga_defconfig +7 -2
@@ -10,13 +10,18 @@ CONFIG_NAMESPACES=y # CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="../arc_initramfs" -CONFIG_EXPERT=y -# CONFIG_FUTEX is not set +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set +CONFIG_KPROBES=y +CONFIG_MODULES=y # CONFIG_LBDAF is not set # CONFIG_BLK_DEV_BSG is not set # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set +CONFIG_ARC_PLAT_FPGA_LEGACY=y +CONFIG_ARC_BOARD_ML509=y CONFIG_ARC_BUILTIN_DTB_NAME="angel4" # CONFIG_COMPACTION is not set # CONFIG_CROSS_MEMORY_ATTACH is not set
Signature · 1 line
1.7.4.1
Arnd Bergmann
maintainerQuoted 15 lines · Vineet Gupta
This patchset based off-of 3.8-rc4, adds the Linux kernel port to ARC700 processor family (750D and 770D) from Synopsys. I would be greatful for further review and feedback.
Salient points about v2 patchset
-------------------------------
* All of the feedback from v1 RFC patchseries has been addressed.* Some of the major fixes for v1 review comments such as Device Tree support, multi-platform-image and syscall-restart issues, have not been squashed into relevent patches, but instead have been applied as slap-on patches on orig ones. This is merely to build up some revision history into the final-upstream-merged version. If people think it's too ugly, I can do the chop-n-dice-n-squash, but my preference would be the style we have now.
Quoted 8 lines
* Unlike RFC v1 series (split into 2 part) this one includes the complete port (still the minimal kernel at halfway checkpoint, builds/runs fine). This combined with prev point, make the full patchset a touch large, for which I appologize in advance.
* The entire series however is also available at
git://github.com/foss-for-synopsys-dwc-arc-processors/linux.gitarc-3.8-lkml-v2
Hi Vineet,
I've looked at the entire series again now, and it looks very good overall, I only had comments for tiny issues. With 76 patches in the series, I doubt that anybody is going to look through all of them again though. Are the patches already part of Linux-next? If not, I would recommend getting them in there as a preparation for merging in 3.9.
I would also recommend to only send incremental patches after that, as well as new versions of some of the patches if you decide to replace them based on comments you get.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 1 line · Vineet Gupta
Hi Vineet,
I've looked at the entire series again now, and it looks very good overall, I only had comments for tiny issues. With 76 patches in the series, I doubt that anybody is going to look through all of them again though.
v3 series addressing all comments is cooked and am about to send it out. I've made 2 bins of the patches to separate out the ones which have NOT changed since v2. I'll send them under separate cover letters to make it easier for reviewers - BTW addition of your ACKs is not being counted as changed - although it's a big change for the patches :-)
Quoted 3 lines
Are the patches already part of Linux-next? If not,
I would recommend getting them in there as a preparation for merging in 3.9.
I have a few questions/clarifications in that regards.
(1) What are the logistics involved. Does it have to be a tag or a branch (typically I see people have branches in next).
(2) Can Stephan pull my branch from github or do I need to be setup apriori on kernel.org. If latter, whom do I need to contact.
(3) That branch will be ARC patches on top of Linus's 3.8 rc4. Actually for my development, I'd also cherry picked a few patches from linux-next (soft and hard dependencies from several different *next trees) - hard ones being
f13a366 CONFIG_GENERIC_SIGALTSTACK build breakage with asm-generic/syscalls.h [Al] b6fca sysctl: Enable IA64 "ignore-unaligned-usertrap" to be used cross-arch [ia64]
Now when I put up a branch for Stephan I guess these should be taken out of ARC branch otherwise merge into linux-next will fail ?
(4) Above series (pure ARC patches) merges fine in today's linux-next, except for a patch touching init/Kconfig (already acked by parisc maintainer) which is slightly different if based off 3.8-rc4 vs. linux-next (because of interim merge) so I'm hoping my tree doesn't get "dropped" from linux-next because of that. But then how will it get fixed.
Quoted 3 lines
I would also recommend to only send incremental patches after that, as well as new versions of some of the patches if you decide to replace them based on comments you get.
Absolutely - I'm tired of rebasing and chopping/merging as well - so anything new will be on top of these (no rebasing).
Thx,
-Vineet
Hi Vineet,
Quoted 5 lines · Vineet Gupta
(3) That branch will be ARC patches on top of Linus's 3.8 rc4. Actually for my development, I'd also cherry picked a few patches from linux-next (soft and hard dependencies from several different *next trees) - hard ones being
f13a366
CONFIG_GENERIC_SIGALTSTACKbuild breakage withasm-generic/syscalls.h[Al]
FYI this one has now been merged into Linus' master.
Cheers
James
Quoted 7 lines · James Hogan
Hi Vineet,
Quoted 4 lines · Vineet Gupta
(3) That branch will be ARC patches on top of Linus's 3.8 rc4. Actually for my development, I'd also cherry picked a few patches from linux-next (soft and hard dependencies from several different *next trees) - hard ones being
Quoted 6 lines
Quoted 1 line
f13a366
CONFIG_GENERIC_SIGALTSTACKbuild breakage withasm-generic/syscalls.h[Al]FYI this one has now been merged into Linus' master.
Cheers
James
OK thanks - but I'd rather have the patches based on a well known checkpoint - so maybe wait for next rc.
Any ideas about other questions on the thread - given that several next trees are still involved.
metag doesn't seem to be on linux-next yet ?
-Vineet
Quoted 9 lines · Vineet Gupta
Quoted 8 lines · James Hogan
Hi Vineet,
Quoted 5 lines · Vineet Gupta
(3) That branch will be ARC patches on top of Linus's 3.8 rc4. Actually for my development, I'd also cherry picked a few patches from linux-next (soft and hard dependencies from several different *next trees) - hard ones being
f13a366
CONFIG_GENERIC_SIGALTSTACKbuild breakage withasm-generic/syscalls.h[Al]
Quoted 8 lines
Quoted 5 lines
FYI this one has now been merged into Linus' master.
Cheers
JamesOK thanks - but I'd rather have the patches based on a well known checkpoint - so maybe wait for next rc.
In that case you may like to merge Al's for-linus branch in the mean time, or the commit you want directly, since it's definitely gone into the master without being rebased.
Quoted 2 lines
Any ideas about other questions on the thread - given that several next trees are still involved.
Stephen said it's fine to merge other trees as long as you let them know so they don't rebase, or ask them which branch is best to use that won't rebase. See the following thread:
https://lkml.org/lkml/2013/1/11/187
Quoted 1 line
metag doesn't seem to be on linux-next yet ?
Not yet, although I think it's almost ready. I need to solicit some acks.
Cheers
James
Quoted 3 lines · Vineet Gupta
This patchset based off-of 3.8-rc4, adds the Linux kernel port to ARC700 processor family (750D and 770D) from Synopsys. I would be greatful for further review and feedback.
One thing: ARC, as I understand it, is a whole family of architectures, which mostly have in common their origin at Synopsys. Can we make this arch/arc700 since that is what it is?
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Quoted 7 lines · H. Peter Anvin
Quoted 3 lines · Vineet Gupta
This patchset based off-of 3.8-rc4, adds the Linux kernel port to ARC700 processor family (750D and 770D) from Synopsys. I would be greatful for further review and feedback.
One thing: ARC, as I understand it, is a whole family of architectures, which mostly have in common their origin at Synopsys.
ARC has had a long history - as a startup in 90's. There used to be ARCTanget Instruction set (and cores A4,A5... based on that) which 10 years ago got deprecated by current ARCompact ISA (600 / 700 cores). So yes it is a family of architectures - but all we care about is the ARCompact and 600/700 at Synopsys.
However, I don't think there were sub-architectures or forks which floated around. The MIPS "ARC" seems to be some sort of firmware standard, but not related to
ARC: Ralf would you care to shed some light ? I don't know of any ARC arch other than these.
Quoted 5 lines
Can we make this
arch/arc700
since that is what it is?-hpa
As of now yes, but in near future we may have a new Instruction Set and cores based on that - so it will be better if we keep a non specific name.
Thx,
-Vineet