diff mbox series

[3/3] ARM: omap2: move platform-specific asm-offset.h to arch/arm/mach-omap2

Message ID 20190408075427.6052-3-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Masahiro Yamada April 8, 2019, 7:54 a.m. UTC
<generated/ti-pm-asm-offsets.h> is only generated and included
by arch/arm/mach-omap2/, so it does not need to reside in the
globally visible include/generated/.

I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
since the prefix 'omap2-' is just redundant in mach-omap2/.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Can this be applied to ARM-SOC tree in a series?
(with Ack from the platform sub-maintainer.)

ti-pm-asm-offsets.h does not need to reside in include/generated/,
but you may ask "Why must it get out of include/generated/?"

My main motivation is to avoid a race condition in the currently
proposed patch:

https://lore.kernel.org/patchwork/patch/1052763/

This patch tries to embed some build artifacts into the kernel.

If arch/arm/mach-omap2/ and kernel/ are built at the same time,
it may embed a truncated file.


 arch/arm/mach-omap2/.gitignore  | 1 +
 arch/arm/mach-omap2/Makefile    | 5 +++--
 arch/arm/mach-omap2/sleep33xx.S | 2 +-
 arch/arm/mach-omap2/sleep43xx.S | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/mach-omap2/.gitignore

Comments

Tony Lindgren April 8, 2019, 4:18 p.m. UTC | #1
Hi,

* Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
> <generated/ti-pm-asm-offsets.h> is only generated and included
> by arch/arm/mach-omap2/, so it does not need to reside in the
> globally visible include/generated/.
> 
> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
> since the prefix 'omap2-' is just redundant in mach-omap2/.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
> Can this be applied to ARM-SOC tree in a series?
> (with Ack from the platform sub-maintainer.)
> 
> ti-pm-asm-offsets.h does not need to reside in include/generated/,
> but you may ask "Why must it get out of include/generated/?"
> 
> My main motivation is to avoid a race condition in the currently
> proposed patch:
> 
> https://lore.kernel.org/patchwork/patch/1052763/
> 
> This patch tries to embed some build artifacts into the kernel.
> 
> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
> it may embed a truncated file.

Looks like a nice improvment to me, adding Keerthy and Dave to Cc.

Keerthy and Dave, can you please test this series with am3 and am4
PM code?

Regards,

Tony

>  arch/arm/mach-omap2/.gitignore  | 1 +
>  arch/arm/mach-omap2/Makefile    | 5 +++--
>  arch/arm/mach-omap2/sleep33xx.S | 2 +-
>  arch/arm/mach-omap2/sleep43xx.S | 2 +-
>  4 files changed, 6 insertions(+), 4 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/.gitignore
> 
> diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
> new file mode 100644
> index 000000000000..79a8d6ea7152
> --- /dev/null
> +++ b/arch/arm/mach-omap2/.gitignore
> @@ -0,0 +1 @@
> +pm-asm-offsets.h
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 85d1b13c9215..26baeb6477af 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -236,9 +236,10 @@ obj-y					+= omap_phy_internal.o
>  
>  obj-$(CONFIG_MACH_OMAP2_TUSB6010)	+= usb-tusb6010.o
>  
> -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
>  	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>  
> -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
>  
>  targets += pm-asm-offsets.s
> +clean-files += pm-asm-offsets.h
> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
> index 47a816468cdb..a003769121aa 100644
> --- a/arch/arm/mach-omap2/sleep33xx.S
> +++ b/arch/arm/mach-omap2/sleep33xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/platform_data/pm33xx.h>
>  #include <linux/ti-emif-sram.h>
> @@ -15,6 +14,7 @@
>  
>  #include "iomap.h"
>  #include "cm33xx.h"
> +#include "pm-asm-offsets.h"
>  
>  #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED			0x00030000
>  #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE			0x0003
> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
> index 5b9343b58fc7..aa288f361c5e 100644
> --- a/arch/arm/mach-omap2/sleep43xx.S
> +++ b/arch/arm/mach-omap2/sleep43xx.S
> @@ -6,7 +6,6 @@
>   *	Dave Gerlach, Vaibhav Bedia
>   */
>  
> -#include <generated/ti-pm-asm-offsets.h>
>  #include <linux/linkage.h>
>  #include <linux/ti-emif-sram.h>
>  #include <linux/platform_data/pm33xx.h>
> @@ -19,6 +18,7 @@
>  #include "iomap.h"
>  #include "omap-secure.h"
>  #include "omap44xx.h"
> +#include "pm-asm-offsets.h"
>  #include "prm33xx.h"
>  #include "prcm43xx.h"
>  
> -- 
> 2.17.1
>
J, KEERTHY April 9, 2019, 4:58 a.m. UTC | #2
On 08/04/19 9:48 PM, Tony Lindgren wrote:
> Hi,
> 
> * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
>> <generated/ti-pm-asm-offsets.h> is only generated and included
>> by arch/arm/mach-omap2/, so it does not need to reside in the
>> globally visible include/generated/.
>>
>> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
>> since the prefix 'omap2-' is just redundant in mach-omap2/.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>> Can this be applied to ARM-SOC tree in a series?
>> (with Ack from the platform sub-maintainer.)
>>
>> ti-pm-asm-offsets.h does not need to reside in include/generated/,
>> but you may ask "Why must it get out of include/generated/?"
>>
>> My main motivation is to avoid a race condition in the currently
>> proposed patch:
>>
>> https://lore.kernel.org/patchwork/patch/1052763/
>>
>> This patch tries to embed some build artifacts into the kernel.
>>
>> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
>> it may embed a truncated file.
> 
> Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
> 
> Keerthy and Dave, can you please test this series with am3 and am4
> PM code?

Tested for Deep Sleep0 on AM33xx Beaglebone-black.
Tested for Deep Sleep0 on AM437x-gp-evm.

Applied this on top of Tony's for-next with the gpio patch
required for RTC+DDR mode on am437x-gp-evm.

Tested-by: Keerthy <j-keerthy@ti.com>

> 
> Regards,
> 
> Tony
> 
>>   arch/arm/mach-omap2/.gitignore  | 1 +
>>   arch/arm/mach-omap2/Makefile    | 5 +++--
>>   arch/arm/mach-omap2/sleep33xx.S | 2 +-
>>   arch/arm/mach-omap2/sleep43xx.S | 2 +-
>>   4 files changed, 6 insertions(+), 4 deletions(-)
>>   create mode 100644 arch/arm/mach-omap2/.gitignore
>>
>> diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
>> new file mode 100644
>> index 000000000000..79a8d6ea7152
>> --- /dev/null
>> +++ b/arch/arm/mach-omap2/.gitignore
>> @@ -0,0 +1 @@
>> +pm-asm-offsets.h
>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>> index 85d1b13c9215..26baeb6477af 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -236,9 +236,10 @@ obj-y					+= omap_phy_internal.o
>>   
>>   obj-$(CONFIG_MACH_OMAP2_TUSB6010)	+= usb-tusb6010.o
>>   
>> -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
>> +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
>>   	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>>   
>> -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
>> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
>>   
>>   targets += pm-asm-offsets.s
>> +clean-files += pm-asm-offsets.h
>> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
>> index 47a816468cdb..a003769121aa 100644
>> --- a/arch/arm/mach-omap2/sleep33xx.S
>> +++ b/arch/arm/mach-omap2/sleep33xx.S
>> @@ -6,7 +6,6 @@
>>    *	Dave Gerlach, Vaibhav Bedia
>>    */
>>   
>> -#include <generated/ti-pm-asm-offsets.h>
>>   #include <linux/linkage.h>
>>   #include <linux/platform_data/pm33xx.h>
>>   #include <linux/ti-emif-sram.h>
>> @@ -15,6 +14,7 @@
>>   
>>   #include "iomap.h"
>>   #include "cm33xx.h"
>> +#include "pm-asm-offsets.h"
>>   
>>   #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED			0x00030000
>>   #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE			0x0003
>> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
>> index 5b9343b58fc7..aa288f361c5e 100644
>> --- a/arch/arm/mach-omap2/sleep43xx.S
>> +++ b/arch/arm/mach-omap2/sleep43xx.S
>> @@ -6,7 +6,6 @@
>>    *	Dave Gerlach, Vaibhav Bedia
>>    */
>>   
>> -#include <generated/ti-pm-asm-offsets.h>
>>   #include <linux/linkage.h>
>>   #include <linux/ti-emif-sram.h>
>>   #include <linux/platform_data/pm33xx.h>
>> @@ -19,6 +18,7 @@
>>   #include "iomap.h"
>>   #include "omap-secure.h"
>>   #include "omap44xx.h"
>> +#include "pm-asm-offsets.h"
>>   #include "prm33xx.h"
>>   #include "prcm43xx.h"
>>   
>> -- 
>> 2.17.1
>>
Masahiro Yamada April 9, 2019, 5:07 a.m. UTC | #3
On Tue, Apr 9, 2019 at 2:00 PM Keerthy <j-keerthy@ti.com> wrote:
>
>
>
> On 08/04/19 9:48 PM, Tony Lindgren wrote:
> > Hi,
> >
> > * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
> >> <generated/ti-pm-asm-offsets.h> is only generated and included
> >> by arch/arm/mach-omap2/, so it does not need to reside in the
> >> globally visible include/generated/.
> >>
> >> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
> >> since the prefix 'omap2-' is just redundant in mach-omap2/.
> >>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> ---
> >>
> >> Can this be applied to ARM-SOC tree in a series?
> >> (with Ack from the platform sub-maintainer.)
> >>
> >> ti-pm-asm-offsets.h does not need to reside in include/generated/,
> >> but you may ask "Why must it get out of include/generated/?"
> >>
> >> My main motivation is to avoid a race condition in the currently
> >> proposed patch:
> >>
> >> https://lore.kernel.org/patchwork/patch/1052763/
> >>
> >> This patch tries to embed some build artifacts into the kernel.
> >>
> >> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
> >> it may embed a truncated file.
> >
> > Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
> >
> > Keerthy and Dave, can you please test this series with am3 and am4
> > PM code?
>
> Tested for Deep Sleep0 on AM33xx Beaglebone-black.
> Tested for Deep Sleep0 on AM437x-gp-evm.
>
> Applied this on top of Tony's for-next with the gpio patch
> required for RTC+DDR mode on am437x-gp-evm.

Was it applied to TI tree?

If so ...

Arnd, Olof,
Please just ignore this patch
since it looks it was already applied to TI tree.

Thanks.
Masahiro Yamada




> Tested-by: Keerthy <j-keerthy@ti.com>
>
> >
> > Regards,
> >
> > Tony
> >
> >>   arch/arm/mach-omap2/.gitignore  | 1 +
> >>   arch/arm/mach-omap2/Makefile    | 5 +++--
> >>   arch/arm/mach-omap2/sleep33xx.S | 2 +-
> >>   arch/arm/mach-omap2/sleep43xx.S | 2 +-
> >>   4 files changed, 6 insertions(+), 4 deletions(-)
> >>   create mode 100644 arch/arm/mach-omap2/.gitignore
> >>
> >> diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
> >> new file mode 100644
> >> index 000000000000..79a8d6ea7152
> >> --- /dev/null
> >> +++ b/arch/arm/mach-omap2/.gitignore
> >> @@ -0,0 +1 @@
> >> +pm-asm-offsets.h
> >> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> >> index 85d1b13c9215..26baeb6477af 100644
> >> --- a/arch/arm/mach-omap2/Makefile
> >> +++ b/arch/arm/mach-omap2/Makefile
> >> @@ -236,9 +236,10 @@ obj-y                                   += omap_phy_internal.o
> >>
> >>   obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
> >>
> >> -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> >> +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
> >>      $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
> >>
> >> -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
> >> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
> >>
> >>   targets += pm-asm-offsets.s
> >> +clean-files += pm-asm-offsets.h
> >> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
> >> index 47a816468cdb..a003769121aa 100644
> >> --- a/arch/arm/mach-omap2/sleep33xx.S
> >> +++ b/arch/arm/mach-omap2/sleep33xx.S
> >> @@ -6,7 +6,6 @@
> >>    * Dave Gerlach, Vaibhav Bedia
> >>    */
> >>
> >> -#include <generated/ti-pm-asm-offsets.h>
> >>   #include <linux/linkage.h>
> >>   #include <linux/platform_data/pm33xx.h>
> >>   #include <linux/ti-emif-sram.h>
> >> @@ -15,6 +14,7 @@
> >>
> >>   #include "iomap.h"
> >>   #include "cm33xx.h"
> >> +#include "pm-asm-offsets.h"
> >>
> >>   #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED                     0x00030000
> >>   #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE                       0x0003
> >> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
> >> index 5b9343b58fc7..aa288f361c5e 100644
> >> --- a/arch/arm/mach-omap2/sleep43xx.S
> >> +++ b/arch/arm/mach-omap2/sleep43xx.S
> >> @@ -6,7 +6,6 @@
> >>    * Dave Gerlach, Vaibhav Bedia
> >>    */
> >>
> >> -#include <generated/ti-pm-asm-offsets.h>
> >>   #include <linux/linkage.h>
> >>   #include <linux/ti-emif-sram.h>
> >>   #include <linux/platform_data/pm33xx.h>
> >> @@ -19,6 +18,7 @@
> >>   #include "iomap.h"
> >>   #include "omap-secure.h"
> >>   #include "omap44xx.h"
> >> +#include "pm-asm-offsets.h"
> >>   #include "prm33xx.h"
> >>   #include "prcm43xx.h"
> >>
> >> --
> >> 2.17.1
> >>



--
Best Regards
Masahiro Yamada
J, KEERTHY April 9, 2019, 5:14 a.m. UTC | #4
On 09/04/19 10:37 AM, Masahiro Yamada wrote:
> On Tue, Apr 9, 2019 at 2:00 PM Keerthy <j-keerthy@ti.com> wrote:
>>
>>
>>
>> On 08/04/19 9:48 PM, Tony Lindgren wrote:
>>> Hi,
>>>
>>> * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
>>>> <generated/ti-pm-asm-offsets.h> is only generated and included
>>>> by arch/arm/mach-omap2/, so it does not need to reside in the
>>>> globally visible include/generated/.
>>>>
>>>> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
>>>> since the prefix 'omap2-' is just redundant in mach-omap2/.
>>>>
>>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>>> ---
>>>>
>>>> Can this be applied to ARM-SOC tree in a series?
>>>> (with Ack from the platform sub-maintainer.)
>>>>
>>>> ti-pm-asm-offsets.h does not need to reside in include/generated/,
>>>> but you may ask "Why must it get out of include/generated/?"
>>>>
>>>> My main motivation is to avoid a race condition in the currently
>>>> proposed patch:
>>>>
>>>> https://lore.kernel.org/patchwork/patch/1052763/
>>>>
>>>> This patch tries to embed some build artifacts into the kernel.
>>>>
>>>> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
>>>> it may embed a truncated file.
>>>
>>> Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
>>>
>>> Keerthy and Dave, can you please test this series with am3 and am4
>>> PM code?
>>
>> Tested for Deep Sleep0 on AM33xx Beaglebone-black.
>> Tested for Deep Sleep0 on AM437x-gp-evm.
>>
>> Applied this on top of Tony's for-next with the gpio patch
>> required for RTC+DDR mode on am437x-gp-evm.
> 
> Was it applied to TI tree?
> 
> If so ...
> 
> Arnd, Olof,
> Please just ignore this patch
> since it looks it was already applied to TI tree.

Masahiro Yamada,

No i manually applied this on top.

Regards,
Keerthy

> 
> Thanks.
> Masahiro Yamada
> 
> 
> 
> 
>> Tested-by: Keerthy <j-keerthy@ti.com>
>>
>>>
>>> Regards,
>>>
>>> Tony
>>>
>>>>    arch/arm/mach-omap2/.gitignore  | 1 +
>>>>    arch/arm/mach-omap2/Makefile    | 5 +++--
>>>>    arch/arm/mach-omap2/sleep33xx.S | 2 +-
>>>>    arch/arm/mach-omap2/sleep43xx.S | 2 +-
>>>>    4 files changed, 6 insertions(+), 4 deletions(-)
>>>>    create mode 100644 arch/arm/mach-omap2/.gitignore
>>>>
>>>> diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
>>>> new file mode 100644
>>>> index 000000000000..79a8d6ea7152
>>>> --- /dev/null
>>>> +++ b/arch/arm/mach-omap2/.gitignore
>>>> @@ -0,0 +1 @@
>>>> +pm-asm-offsets.h
>>>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>>>> index 85d1b13c9215..26baeb6477af 100644
>>>> --- a/arch/arm/mach-omap2/Makefile
>>>> +++ b/arch/arm/mach-omap2/Makefile
>>>> @@ -236,9 +236,10 @@ obj-y                                   += omap_phy_internal.o
>>>>
>>>>    obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
>>>>
>>>> -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
>>>> +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
>>>>       $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>>>>
>>>> -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
>>>> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
>>>>
>>>>    targets += pm-asm-offsets.s
>>>> +clean-files += pm-asm-offsets.h
>>>> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
>>>> index 47a816468cdb..a003769121aa 100644
>>>> --- a/arch/arm/mach-omap2/sleep33xx.S
>>>> +++ b/arch/arm/mach-omap2/sleep33xx.S
>>>> @@ -6,7 +6,6 @@
>>>>     * Dave Gerlach, Vaibhav Bedia
>>>>     */
>>>>
>>>> -#include <generated/ti-pm-asm-offsets.h>
>>>>    #include <linux/linkage.h>
>>>>    #include <linux/platform_data/pm33xx.h>
>>>>    #include <linux/ti-emif-sram.h>
>>>> @@ -15,6 +14,7 @@
>>>>
>>>>    #include "iomap.h"
>>>>    #include "cm33xx.h"
>>>> +#include "pm-asm-offsets.h"
>>>>
>>>>    #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED                     0x00030000
>>>>    #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE                       0x0003
>>>> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
>>>> index 5b9343b58fc7..aa288f361c5e 100644
>>>> --- a/arch/arm/mach-omap2/sleep43xx.S
>>>> +++ b/arch/arm/mach-omap2/sleep43xx.S
>>>> @@ -6,7 +6,6 @@
>>>>     * Dave Gerlach, Vaibhav Bedia
>>>>     */
>>>>
>>>> -#include <generated/ti-pm-asm-offsets.h>
>>>>    #include <linux/linkage.h>
>>>>    #include <linux/ti-emif-sram.h>
>>>>    #include <linux/platform_data/pm33xx.h>
>>>> @@ -19,6 +18,7 @@
>>>>    #include "iomap.h"
>>>>    #include "omap-secure.h"
>>>>    #include "omap44xx.h"
>>>> +#include "pm-asm-offsets.h"
>>>>    #include "prm33xx.h"
>>>>    #include "prcm43xx.h"
>>>>
>>>> --
>>>> 2.17.1
>>>>
> 
> 
> 
> --
> Best Regards
> Masahiro Yamada
>
Masahiro Yamada April 9, 2019, 7:05 a.m. UTC | #5
On Tue, Apr 9, 2019 at 2:17 PM Keerthy <j-keerthy@ti.com> wrote:
>
>
>
> On 09/04/19 10:37 AM, Masahiro Yamada wrote:
> > On Tue, Apr 9, 2019 at 2:00 PM Keerthy <j-keerthy@ti.com> wrote:
> >>
> >>
> >>
> >> On 08/04/19 9:48 PM, Tony Lindgren wrote:
> >>> Hi,
> >>>
> >>> * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
> >>>> <generated/ti-pm-asm-offsets.h> is only generated and included
> >>>> by arch/arm/mach-omap2/, so it does not need to reside in the
> >>>> globally visible include/generated/.
> >>>>
> >>>> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
> >>>> since the prefix 'omap2-' is just redundant in mach-omap2/.
> >>>>
> >>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >>>> ---
> >>>>
> >>>> Can this be applied to ARM-SOC tree in a series?
> >>>> (with Ack from the platform sub-maintainer.)
> >>>>
> >>>> ti-pm-asm-offsets.h does not need to reside in include/generated/,
> >>>> but you may ask "Why must it get out of include/generated/?"
> >>>>
> >>>> My main motivation is to avoid a race condition in the currently
> >>>> proposed patch:
> >>>>
> >>>> https://lore.kernel.org/patchwork/patch/1052763/
> >>>>
> >>>> This patch tries to embed some build artifacts into the kernel.
> >>>>
> >>>> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
> >>>> it may embed a truncated file.
> >>>
> >>> Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
> >>>
> >>> Keerthy and Dave, can you please test this series with am3 and am4
> >>> PM code?
> >>
> >> Tested for Deep Sleep0 on AM33xx Beaglebone-black.
> >> Tested for Deep Sleep0 on AM437x-gp-evm.
> >>
> >> Applied this on top of Tony's for-next with the gpio patch
> >> required for RTC+DDR mode on am437x-gp-evm.
> >
> > Was it applied to TI tree?
> >
> > If so ...
> >
> > Arnd, Olof,
> > Please just ignore this patch
> > since it looks it was already applied to TI tree.
>
> Masahiro Yamada,
>
> No i manually applied this on top.
>
> Regards,
> Keerthy

Keerthy,
Sorry, I misunderstood.

You just applied it to your local tree for testing.

Then, I still think it is better to
apply this series in a correct order.

The reason I sent this in a series was
to make sure asm-offset headers are correctly
cleaned up.


Thank you.



> >
> > Thanks.
> > Masahiro Yamada
> >
> >
> >
> >
> >> Tested-by: Keerthy <j-keerthy@ti.com>
> >>
> >>>
> >>> Regards,
> >>>
> >>> Tony
> >>>
> >>>>    arch/arm/mach-omap2/.gitignore  | 1 +
> >>>>    arch/arm/mach-omap2/Makefile    | 5 +++--
> >>>>    arch/arm/mach-omap2/sleep33xx.S | 2 +-
> >>>>    arch/arm/mach-omap2/sleep43xx.S | 2 +-
> >>>>    4 files changed, 6 insertions(+), 4 deletions(-)
> >>>>    create mode 100644 arch/arm/mach-omap2/.gitignore
> >>>>
> >>>> diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
> >>>> new file mode 100644
> >>>> index 000000000000..79a8d6ea7152
> >>>> --- /dev/null
> >>>> +++ b/arch/arm/mach-omap2/.gitignore
> >>>> @@ -0,0 +1 @@
> >>>> +pm-asm-offsets.h
> >>>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> >>>> index 85d1b13c9215..26baeb6477af 100644
> >>>> --- a/arch/arm/mach-omap2/Makefile
> >>>> +++ b/arch/arm/mach-omap2/Makefile
> >>>> @@ -236,9 +236,10 @@ obj-y                                   += omap_phy_internal.o
> >>>>
> >>>>    obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
> >>>>
> >>>> -include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> >>>> +$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
> >>>>       $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
> >>>>
> >>>> -$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
> >>>> +$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
> >>>>
> >>>>    targets += pm-asm-offsets.s
> >>>> +clean-files += pm-asm-offsets.h
> >>>> diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
> >>>> index 47a816468cdb..a003769121aa 100644
> >>>> --- a/arch/arm/mach-omap2/sleep33xx.S
> >>>> +++ b/arch/arm/mach-omap2/sleep33xx.S
> >>>> @@ -6,7 +6,6 @@
> >>>>     * Dave Gerlach, Vaibhav Bedia
> >>>>     */
> >>>>
> >>>> -#include <generated/ti-pm-asm-offsets.h>
> >>>>    #include <linux/linkage.h>
> >>>>    #include <linux/platform_data/pm33xx.h>
> >>>>    #include <linux/ti-emif-sram.h>
> >>>> @@ -15,6 +14,7 @@
> >>>>
> >>>>    #include "iomap.h"
> >>>>    #include "cm33xx.h"
> >>>> +#include "pm-asm-offsets.h"
> >>>>
> >>>>    #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED                     0x00030000
> >>>>    #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE                       0x0003
> >>>> diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
> >>>> index 5b9343b58fc7..aa288f361c5e 100644
> >>>> --- a/arch/arm/mach-omap2/sleep43xx.S
> >>>> +++ b/arch/arm/mach-omap2/sleep43xx.S
> >>>> @@ -6,7 +6,6 @@
> >>>>     * Dave Gerlach, Vaibhav Bedia
> >>>>     */
> >>>>
> >>>> -#include <generated/ti-pm-asm-offsets.h>
> >>>>    #include <linux/linkage.h>
> >>>>    #include <linux/ti-emif-sram.h>
> >>>>    #include <linux/platform_data/pm33xx.h>
> >>>> @@ -19,6 +18,7 @@
> >>>>    #include "iomap.h"
> >>>>    #include "omap-secure.h"
> >>>>    #include "omap44xx.h"
> >>>> +#include "pm-asm-offsets.h"
> >>>>    #include "prm33xx.h"
> >>>>    #include "prcm43xx.h"
> >>>>
> >>>> --
> >>>> 2.17.1
> >>>>
> >
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada
> >
Tony Lindgren April 9, 2019, 2:17 p.m. UTC | #6
* Masahiro Yamada <yamada.masahiro@socionext.com> [190409 07:06]:
> On Tue, Apr 9, 2019 at 2:17 PM Keerthy <j-keerthy@ti.com> wrote:
> >
> >
> >
> > On 09/04/19 10:37 AM, Masahiro Yamada wrote:
> > > On Tue, Apr 9, 2019 at 2:00 PM Keerthy <j-keerthy@ti.com> wrote:
> > >>
> > >>
> > >>
> > >> On 08/04/19 9:48 PM, Tony Lindgren wrote:
> > >>> Hi,
> > >>>
> > >>> * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
> > >>>> <generated/ti-pm-asm-offsets.h> is only generated and included
> > >>>> by arch/arm/mach-omap2/, so it does not need to reside in the
> > >>>> globally visible include/generated/.
> > >>>>
> > >>>> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
> > >>>> since the prefix 'omap2-' is just redundant in mach-omap2/.
> > >>>>
> > >>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > >>>> ---
> > >>>>
> > >>>> Can this be applied to ARM-SOC tree in a series?
> > >>>> (with Ack from the platform sub-maintainer.)
> > >>>>
> > >>>> ti-pm-asm-offsets.h does not need to reside in include/generated/,
> > >>>> but you may ask "Why must it get out of include/generated/?"
> > >>>>
> > >>>> My main motivation is to avoid a race condition in the currently
> > >>>> proposed patch:
> > >>>>
> > >>>> https://lore.kernel.org/patchwork/patch/1052763/
> > >>>>
> > >>>> This patch tries to embed some build artifacts into the kernel.
> > >>>>
> > >>>> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
> > >>>> it may embed a truncated file.
> > >>>
> > >>> Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
> > >>>
> > >>> Keerthy and Dave, can you please test this series with am3 and am4
> > >>> PM code?
> > >>
> > >> Tested for Deep Sleep0 on AM33xx Beaglebone-black.
> > >> Tested for Deep Sleep0 on AM437x-gp-evm.
> > >>
> > >> Applied this on top of Tony's for-next with the gpio patch
> > >> required for RTC+DDR mode on am437x-gp-evm.
> > >
> > > Was it applied to TI tree?
> > >
> > > If so ...
> > >
> > > Arnd, Olof,
> > > Please just ignore this patch
> > > since it looks it was already applied to TI tree.
> >
> > Masahiro Yamada,
> >
> > No i manually applied this on top.
> >
> > Regards,
> > Keerthy
> 
> Keerthy,
> Sorry, I misunderstood.
> 
> You just applied it to your local tree for testing.
> 
> Then, I still think it is better to
> apply this series in a correct order.
> 
> The reason I sent this in a series was
> to make sure asm-offset headers are correctly
> cleaned up.

Yes looks good to me:

Acked-by: Tony Lindgren <tony@atomide.com>
Masahiro Yamada April 23, 2019, 4:40 a.m. UTC | #7
On Tue, Apr 9, 2019 at 11:20 PM Tony Lindgren <tony@atomide.com> wrote:
>
> * Masahiro Yamada <yamada.masahiro@socionext.com> [190409 07:06]:
> > On Tue, Apr 9, 2019 at 2:17 PM Keerthy <j-keerthy@ti.com> wrote:
> > >
> > >
> > >
> > > On 09/04/19 10:37 AM, Masahiro Yamada wrote:
> > > > On Tue, Apr 9, 2019 at 2:00 PM Keerthy <j-keerthy@ti.com> wrote:
> > > >>
> > > >>
> > > >>
> > > >> On 08/04/19 9:48 PM, Tony Lindgren wrote:
> > > >>> Hi,
> > > >>>
> > > >>> * Masahiro Yamada <yamada.masahiro@socionext.com> [190408 07:56]:
> > > >>>> <generated/ti-pm-asm-offsets.h> is only generated and included
> > > >>>> by arch/arm/mach-omap2/, so it does not need to reside in the
> > > >>>> globally visible include/generated/.
> > > >>>>
> > > >>>> I moved and renamed it to arch/arm/mach-omap2/pm-asm-offsets.h
> > > >>>> since the prefix 'omap2-' is just redundant in mach-omap2/.
> > > >>>>
> > > >>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > >>>> ---
> > > >>>>
> > > >>>> Can this be applied to ARM-SOC tree in a series?
> > > >>>> (with Ack from the platform sub-maintainer.)
> > > >>>>
> > > >>>> ti-pm-asm-offsets.h does not need to reside in include/generated/,
> > > >>>> but you may ask "Why must it get out of include/generated/?"
> > > >>>>
> > > >>>> My main motivation is to avoid a race condition in the currently
> > > >>>> proposed patch:
> > > >>>>
> > > >>>> https://lore.kernel.org/patchwork/patch/1052763/
> > > >>>>
> > > >>>> This patch tries to embed some build artifacts into the kernel.
> > > >>>>
> > > >>>> If arch/arm/mach-omap2/ and kernel/ are built at the same time,
> > > >>>> it may embed a truncated file.
> > > >>>
> > > >>> Looks like a nice improvment to me, adding Keerthy and Dave to Cc.
> > > >>>
> > > >>> Keerthy and Dave, can you please test this series with am3 and am4
> > > >>> PM code?
> > > >>
> > > >> Tested for Deep Sleep0 on AM33xx Beaglebone-black.
> > > >> Tested for Deep Sleep0 on AM437x-gp-evm.
> > > >>
> > > >> Applied this on top of Tony's for-next with the gpio patch
> > > >> required for RTC+DDR mode on am437x-gp-evm.
> > > >
> > > > Was it applied to TI tree?
> > > >
> > > > If so ...
> > > >
> > > > Arnd, Olof,
> > > > Please just ignore this patch
> > > > since it looks it was already applied to TI tree.
> > >
> > > Masahiro Yamada,
> > >
> > > No i manually applied this on top.
> > >
> > > Regards,
> > > Keerthy
> >
> > Keerthy,
> > Sorry, I misunderstood.
> >
> > You just applied it to your local tree for testing.
> >
> > Then, I still think it is better to
> > apply this series in a correct order.
> >
> > The reason I sent this in a series was
> > to make sure asm-offset headers are correctly
> > cleaned up.
>
> Yes looks good to me:
>
> Acked-by: Tony Lindgren <tony@atomide.com>

Sorry, this turned out to break the out-of-tree build.

Please do not apply this for now.

I will come back to this later when ready.
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/.gitignore b/arch/arm/mach-omap2/.gitignore
new file mode 100644
index 000000000000..79a8d6ea7152
--- /dev/null
+++ b/arch/arm/mach-omap2/.gitignore
@@ -0,0 +1 @@ 
+pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 85d1b13c9215..26baeb6477af 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -236,9 +236,10 @@  obj-y					+= omap_phy_internal.o
 
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)	+= usb-tusb6010.o
 
-include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
+$(obj)/pm-asm-offsets.h: $(obj)/pm-asm-offsets.s FORCE
 	$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
 
-$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
+$(obj)/sleep33xx.o $(obj)/sleep43xx.o: $(obj)/pm-asm-offsets.h
 
 targets += pm-asm-offsets.s
+clean-files += pm-asm-offsets.h
diff --git a/arch/arm/mach-omap2/sleep33xx.S b/arch/arm/mach-omap2/sleep33xx.S
index 47a816468cdb..a003769121aa 100644
--- a/arch/arm/mach-omap2/sleep33xx.S
+++ b/arch/arm/mach-omap2/sleep33xx.S
@@ -6,7 +6,6 @@ 
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/platform_data/pm33xx.h>
 #include <linux/ti-emif-sram.h>
@@ -15,6 +14,7 @@ 
 
 #include "iomap.h"
 #include "cm33xx.h"
+#include "pm-asm-offsets.h"
 
 #define AM33XX_CM_CLKCTRL_MODULESTATE_DISABLED			0x00030000
 #define AM33XX_CM_CLKCTRL_MODULEMODE_DISABLE			0x0003
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index 5b9343b58fc7..aa288f361c5e 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -6,7 +6,6 @@ 
  *	Dave Gerlach, Vaibhav Bedia
  */
 
-#include <generated/ti-pm-asm-offsets.h>
 #include <linux/linkage.h>
 #include <linux/ti-emif-sram.h>
 #include <linux/platform_data/pm33xx.h>
@@ -19,6 +18,7 @@ 
 #include "iomap.h"
 #include "omap-secure.h"
 #include "omap44xx.h"
+#include "pm-asm-offsets.h"
 #include "prm33xx.h"
 #include "prcm43xx.h"