diff for duplicates of <1428080481-18591-3-git-send-email-mcoquelin.stm32@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 576a8db..8b13789 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,74 +1 @@ -From Cortex-M reference manuals, the nvic supports up to 240 interrupts. -So the number of entries in vectors table is up to 256. -This patch adds a new config flag to specify the number of external interrupts. -Some ifdeferies are added in order to respect the natural alignment without -wasting too much space on smaller systems. - -Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> -Acked-by: Stefan Agner <stefan@agner.ch> -Tested-by: Chanwoo Choi <cw00.choi@samsung.com> -Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com> ---- - arch/arm/kernel/entry-v7m.S | 13 +++++++++---- - arch/arm/mm/Kconfig | 15 +++++++++++++++ - 2 files changed, 24 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S -index 8944f49..b6c8bb9 100644 ---- a/arch/arm/kernel/entry-v7m.S -+++ b/arch/arm/kernel/entry-v7m.S -@@ -117,9 +117,14 @@ ENTRY(__switch_to) - ENDPROC(__switch_to) - - .data -- .align 8 -+#if CONFIG_CPU_V7M_NUM_IRQ <= 112 -+ .align 9 -+#else -+ .align 10 -+#endif -+ - /* -- * Vector table (64 words => 256 bytes natural alignment) -+ * Vector table (Natural alignment need to be ensured) - */ - ENTRY(vector_table) - .long 0 @ 0 - Reset stack pointer -@@ -138,6 +143,6 @@ ENTRY(vector_table) - .long __invalid_entry @ 13 - Reserved - .long __pendsv_entry @ 14 - PendSV - .long __invalid_entry @ 15 - SysTick -- .rept 64 - 16 -- .long __irq_entry @ 16..64 - External Interrupts -+ .rept CONFIG_CPU_V7M_NUM_IRQ -+ .long __irq_entry @ External Interrupts - .endr -diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig -index 9b4f29e..aec53b4 100644 ---- a/arch/arm/mm/Kconfig -+++ b/arch/arm/mm/Kconfig -@@ -604,6 +604,21 @@ config CPU_USE_DOMAINS - This option enables or disables the use of domain switching - via the set_fs() function. - -+config CPU_V7M_NUM_IRQ -+ int "Number of external interrupts connected to the NVIC" -+ depends on CPU_V7M -+ default 90 if ARCH_STM32 -+ default 38 if ARCH_EFM32 -+ default 240 -+ help -+ This option indicates the number of interrupts connected to the NVIC. -+ The value can be larger than the real number of interrupts supported -+ by the system, but must not be lower. -+ The default value is 240, corresponding to the maximum number of -+ interrupts supported by the NVIC on Cortex-M family. -+ -+ If unsure, keep default value. -+ - # - # CPU supports 36-bit I/O - # --- -1.9.1 diff --git a/a/content_digest b/N1/content_digest index 1dde946..539c401 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -41,82 +41,11 @@ linux-kernel@vger.kernel.org devicetree@vger.kernel.org linux-gpio@vger.kernel.org - " linux-serial@vger.ke\0" + linux-serial@vger.kernel.org + linux-arch@vger.kernel.org + linux-api@vger.kernel.org + " mcoquelin.stm32@gmail.com\0" "\00:1\0" "b\0" - "From Cortex-M reference manuals, the nvic supports up to 240 interrupts.\n" - "So the number of entries in vectors table is up to 256.\n" - "\n" - "This patch adds a new config flag to specify the number of external interrupts.\n" - "Some ifdeferies are added in order to respect the natural alignment without\n" - "wasting too much space on smaller systems.\n" - "\n" - "Acked-by: Uwe Kleine-K\303\266nig <u.kleine-koenig@pengutronix.de>\n" - "Acked-by: Stefan Agner <stefan@agner.ch>\n" - "Tested-by: Chanwoo Choi <cw00.choi@samsung.com>\n" - "Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>\n" - "---\n" - " arch/arm/kernel/entry-v7m.S | 13 +++++++++----\n" - " arch/arm/mm/Kconfig | 15 +++++++++++++++\n" - " 2 files changed, 24 insertions(+), 4 deletions(-)\n" - "\n" - "diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S\n" - "index 8944f49..b6c8bb9 100644\n" - "--- a/arch/arm/kernel/entry-v7m.S\n" - "+++ b/arch/arm/kernel/entry-v7m.S\n" - "@@ -117,9 +117,14 @@ ENTRY(__switch_to)\n" - " ENDPROC(__switch_to)\n" - " \n" - " \t.data\n" - "-\t.align\t8\n" - "+#if CONFIG_CPU_V7M_NUM_IRQ <= 112\n" - "+\t.align\t9\n" - "+#else\n" - "+\t.align\t10\n" - "+#endif\n" - "+\n" - " /*\n" - "- * Vector table (64 words => 256 bytes natural alignment)\n" - "+ * Vector table (Natural alignment need to be ensured)\n" - " */\n" - " ENTRY(vector_table)\n" - " \t.long\t0\t\t\t@ 0 - Reset stack pointer\n" - "@@ -138,6 +143,6 @@ ENTRY(vector_table)\n" - " \t.long\t__invalid_entry\t\t@ 13 - Reserved\n" - " \t.long\t__pendsv_entry\t\t@ 14 - PendSV\n" - " \t.long\t__invalid_entry\t\t@ 15 - SysTick\n" - "-\t.rept\t64 - 16\n" - "-\t.long\t__irq_entry\t\t@ 16..64 - External Interrupts\n" - "+\t.rept\tCONFIG_CPU_V7M_NUM_IRQ\n" - "+\t.long\t__irq_entry\t\t@ External Interrupts\n" - " \t.endr\n" - "diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig\n" - "index 9b4f29e..aec53b4 100644\n" - "--- a/arch/arm/mm/Kconfig\n" - "+++ b/arch/arm/mm/Kconfig\n" - "@@ -604,6 +604,21 @@ config CPU_USE_DOMAINS\n" - " \t This option enables or disables the use of domain switching\n" - " \t via the set_fs() function.\n" - " \n" - "+config CPU_V7M_NUM_IRQ\n" - "+\tint \"Number of external interrupts connected to the NVIC\"\n" - "+\tdepends on CPU_V7M\n" - "+\tdefault 90 if ARCH_STM32\n" - "+\tdefault 38 if ARCH_EFM32\n" - "+\tdefault 240\n" - "+\thelp\n" - "+\t This option indicates the number of interrupts connected to the NVIC.\n" - "+\t The value can be larger than the real number of interrupts supported\n" - "+\t by the system, but must not be lower.\n" - "+\t The default value is 240, corresponding to the maximum number of\n" - "+\t interrupts supported by the NVIC on Cortex-M family.\n" - "+\n" - "+\t If unsure, keep default value.\n" - "+\n" - " #\n" - " # CPU supports 36-bit I/O\n" - " #\n" - "-- \n" - 1.9.1 -e5b1a7593fa645765bbf58c510d377d4d250c6cb01b1ca2fe3d1e1ea383305f0 +fb393eaab60a5ce7fff354b9f38cc2c2e5ddf7be00ad1ecbb42f88430ee96866
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox