Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
@ 2016-11-22 19:43 Steven J. Hill
  2016-11-22 19:43 ` Steven J. Hill
  2016-12-21 17:10 ` Ralf Baechle
  0 siblings, 2 replies; 6+ messages in thread
From: Steven J. Hill @ 2016-11-22 19:43 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

Some bootloaders pass the kernel parameters in different registers.
Allow for platform-specific initialization of the command line.

Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
---
 arch/mips/include/asm/fw/fw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
index d0ef8b4..0fcd63e 100644
--- a/arch/mips/include/asm/fw/fw.h
+++ b/arch/mips/include/asm/fw/fw.h
@@ -21,7 +21,7 @@
 #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
 #define fw_envp(index)		((char *)(long)_fw_envp[(index)])

-extern void fw_init_cmdline(void);
+extern void __weak fw_init_cmdline(void);
 extern char *fw_getcmdline(void);
 extern void fw_meminit(void);
 extern char *fw_getenv(char *name);
-- 
1.9.1

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

* [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
  2016-11-22 19:43 [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak Steven J. Hill
@ 2016-11-22 19:43 ` Steven J. Hill
  2016-12-21 17:10 ` Ralf Baechle
  1 sibling, 0 replies; 6+ messages in thread
From: Steven J. Hill @ 2016-11-22 19:43 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

Some bootloaders pass the kernel parameters in different registers.
Allow for platform-specific initialization of the command line.

Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
---
 arch/mips/include/asm/fw/fw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
index d0ef8b4..0fcd63e 100644
--- a/arch/mips/include/asm/fw/fw.h
+++ b/arch/mips/include/asm/fw/fw.h
@@ -21,7 +21,7 @@
 #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
 #define fw_envp(index)		((char *)(long)_fw_envp[(index)])

-extern void fw_init_cmdline(void);
+extern void __weak fw_init_cmdline(void);
 extern char *fw_getcmdline(void);
 extern void fw_meminit(void);
 extern char *fw_getenv(char *name);
-- 
1.9.1

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

* Re: [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
  2016-11-22 19:43 [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak Steven J. Hill
  2016-11-22 19:43 ` Steven J. Hill
@ 2016-12-21 17:10 ` Ralf Baechle
  2016-12-21 18:08   ` David Daney
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2016-12-21 17:10 UTC (permalink / raw)
  To: Steven J. Hill; +Cc: linux-mips

On Tue, Nov 22, 2016 at 01:43:54PM -0600, Steven J. Hill wrote:

> Some bootloaders pass the kernel parameters in different registers.
> Allow for platform-specific initialization of the command line.
> 
> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
> ---
>  arch/mips/include/asm/fw/fw.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
> index d0ef8b4..0fcd63e 100644
> --- a/arch/mips/include/asm/fw/fw.h
> +++ b/arch/mips/include/asm/fw/fw.h
> @@ -21,7 +21,7 @@
>  #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
>  #define fw_envp(index)		((char *)(long)_fw_envp[(index)])
> 
> -extern void fw_init_cmdline(void);
> +extern void __weak fw_init_cmdline(void);
>  extern char *fw_getcmdline(void);
>  extern void fw_meminit(void);
>  extern char *fw_getenv(char *name);

Nice try - expect it doesn't work.

The definition of the function needs to be marked __weak; marking the
declaration will only kindly express your wishes to GCC and it being
GCC will ignore them ;-)

  Ralf

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

* Re: [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
  2016-12-21 17:10 ` Ralf Baechle
@ 2016-12-21 18:08   ` David Daney
  2016-12-21 18:08     ` David Daney
  2016-12-21 18:09     ` Ralf Baechle
  0 siblings, 2 replies; 6+ messages in thread
From: David Daney @ 2016-12-21 18:08 UTC (permalink / raw)
  To: Ralf Baechle, Steven J. Hill; +Cc: linux-mips

On 12/21/2016 09:10 AM, Ralf Baechle wrote:
> On Tue, Nov 22, 2016 at 01:43:54PM -0600, Steven J. Hill wrote:
>
>> Some bootloaders pass the kernel parameters in different registers.
>> Allow for platform-specific initialization of the command line.
>>
>> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
>> ---
>>  arch/mips/include/asm/fw/fw.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
>> index d0ef8b4..0fcd63e 100644
>> --- a/arch/mips/include/asm/fw/fw.h
>> +++ b/arch/mips/include/asm/fw/fw.h
>> @@ -21,7 +21,7 @@
>>  #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
>>  #define fw_envp(index)		((char *)(long)_fw_envp[(index)])
>>
>> -extern void fw_init_cmdline(void);
>> +extern void __weak fw_init_cmdline(void);
>>  extern char *fw_getcmdline(void);
>>  extern void fw_meminit(void);
>>  extern char *fw_getenv(char *name);
>
> Nice try - expect it doesn't work.

Ralf,  Can you drop this unneeded patch, and still apply the other 
OCTEON KASLR patches in this set?

Thanks,
David Daney


>
> The definition of the function needs to be marked __weak; marking the
> declaration will only kindly express your wishes to GCC and it being
> GCC will ignore them ;-)
>
>   Ralf
>

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

* Re: [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
  2016-12-21 18:08   ` David Daney
@ 2016-12-21 18:08     ` David Daney
  2016-12-21 18:09     ` Ralf Baechle
  1 sibling, 0 replies; 6+ messages in thread
From: David Daney @ 2016-12-21 18:08 UTC (permalink / raw)
  To: Ralf Baechle, Steven J. Hill; +Cc: linux-mips

On 12/21/2016 09:10 AM, Ralf Baechle wrote:
> On Tue, Nov 22, 2016 at 01:43:54PM -0600, Steven J. Hill wrote:
>
>> Some bootloaders pass the kernel parameters in different registers.
>> Allow for platform-specific initialization of the command line.
>>
>> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
>> ---
>>  arch/mips/include/asm/fw/fw.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
>> index d0ef8b4..0fcd63e 100644
>> --- a/arch/mips/include/asm/fw/fw.h
>> +++ b/arch/mips/include/asm/fw/fw.h
>> @@ -21,7 +21,7 @@
>>  #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
>>  #define fw_envp(index)		((char *)(long)_fw_envp[(index)])
>>
>> -extern void fw_init_cmdline(void);
>> +extern void __weak fw_init_cmdline(void);
>>  extern char *fw_getcmdline(void);
>>  extern void fw_meminit(void);
>>  extern char *fw_getenv(char *name);
>
> Nice try - expect it doesn't work.

Ralf,  Can you drop this unneeded patch, and still apply the other 
OCTEON KASLR patches in this set?

Thanks,
David Daney


>
> The definition of the function needs to be marked __weak; marking the
> declaration will only kindly express your wishes to GCC and it being
> GCC will ignore them ;-)
>
>   Ralf
>

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

* Re: [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak.
  2016-12-21 18:08   ` David Daney
  2016-12-21 18:08     ` David Daney
@ 2016-12-21 18:09     ` Ralf Baechle
  1 sibling, 0 replies; 6+ messages in thread
From: Ralf Baechle @ 2016-12-21 18:09 UTC (permalink / raw)
  To: David Daney; +Cc: Steven J. Hill, linux-mips

On Wed, Dec 21, 2016 at 10:08:11AM -0800, David Daney wrote:

> On 12/21/2016 09:10 AM, Ralf Baechle wrote:
> > On Tue, Nov 22, 2016 at 01:43:54PM -0600, Steven J. Hill wrote:
> > 
> > > Some bootloaders pass the kernel parameters in different registers.
> > > Allow for platform-specific initialization of the command line.
> > > 
> > > Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com>
> > > ---
> > >  arch/mips/include/asm/fw/fw.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/mips/include/asm/fw/fw.h b/arch/mips/include/asm/fw/fw.h
> > > index d0ef8b4..0fcd63e 100644
> > > --- a/arch/mips/include/asm/fw/fw.h
> > > +++ b/arch/mips/include/asm/fw/fw.h
> > > @@ -21,7 +21,7 @@
> > >  #define fw_argv(index)		((char *)(long)_fw_argv[(index)])
> > >  #define fw_envp(index)		((char *)(long)_fw_envp[(index)])
> > > 
> > > -extern void fw_init_cmdline(void);
> > > +extern void __weak fw_init_cmdline(void);
> > >  extern char *fw_getcmdline(void);
> > >  extern void fw_meminit(void);
> > >  extern char *fw_getenv(char *name);
> > 
> > Nice try - expect it doesn't work.
> 
> Ralf,  Can you drop this unneeded patch, and still apply the other OCTEON
> KASLR patches in this set?

Already done and pushed a few minutes ago.

  Ralf

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

end of thread, other threads:[~2016-12-21 18:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-22 19:43 [PATCH 1/5] MIPS: FW: Make fw_init_cmdline() to be __weak Steven J. Hill
2016-11-22 19:43 ` Steven J. Hill
2016-12-21 17:10 ` Ralf Baechle
2016-12-21 18:08   ` David Daney
2016-12-21 18:08     ` David Daney
2016-12-21 18:09     ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox