Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mips: traps, add __init to parity_protection_init
@ 2020-07-23  9:42 Jiri Slaby
  2020-07-23 10:00 ` Sergei Shtylyov
  2020-07-24 11:15 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Slaby @ 2020-07-23  9:42 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-kernel, Jiri Slaby, linux-mips

It references __initdata and is called only from an __init function:
trap_init. This avoids section mismatches (which I am seeing with gcc
10).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
---
 arch/mips/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index f655af68176c..702143ad7b47 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1680,7 +1680,7 @@ __setup("nol2par", nol2parity);
  * Some MIPS CPUs can enable/disable for cache parity detection, but do
  * it different ways.
  */
-static inline void parity_protection_init(void)
+static inline __init void parity_protection_init(void)
 {
 #define ERRCTL_PE	0x80000000
 #define ERRCTL_L2P	0x00800000
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mips: traps, add __init to parity_protection_init
  2020-07-23  9:42 [PATCH] mips: traps, add __init to parity_protection_init Jiri Slaby
@ 2020-07-23 10:00 ` Sergei Shtylyov
  2020-07-24 11:15 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2020-07-23 10:00 UTC (permalink / raw)
  To: Jiri Slaby, tsbogend; +Cc: linux-kernel, linux-mips

Hello!

On 23.07.2020 12:42, Jiri Slaby wrote:

> It references __initdata and is called only from an __init function:
> trap_init. This avoids section mismatches (which I am seeing with gcc
> 10).
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: linux-mips@vger.kernel.org
> ---
>   arch/mips/kernel/traps.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index f655af68176c..702143ad7b47 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -1680,7 +1680,7 @@ __setup("nol2par", nol2parity);
>    * Some MIPS CPUs can enable/disable for cache parity detection, but do
>    * it different ways.
>    */
> -static inline void parity_protection_init(void)
> +static inline __init void parity_protection_init(void)

    *inline* in a .c file? Perhaps gcc-10 has it out-of-line?

[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mips: traps, add __init to parity_protection_init
  2020-07-23  9:42 [PATCH] mips: traps, add __init to parity_protection_init Jiri Slaby
  2020-07-23 10:00 ` Sergei Shtylyov
@ 2020-07-24 11:15 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2020-07-24 11:15 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: linux-kernel, linux-mips

On Thu, Jul 23, 2020 at 11:42:35AM +0200, Jiri Slaby wrote:
> It references __initdata and is called only from an __init function:
> trap_init. This avoids section mismatches (which I am seeing with gcc
> 10).
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: linux-mips@vger.kernel.org
> ---
>  arch/mips/kernel/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  9:42 [PATCH] mips: traps, add __init to parity_protection_init Jiri Slaby
2020-07-23 10:00 ` Sergei Shtylyov
2020-07-24 11:15 ` Thomas Bogendoerfer

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git