Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-06 Thread James Hogan
On Thu, Apr 05, 2018 at 10:42:19PM +0100, James Hogan wrote:
> On Thu, Apr 05, 2018 at 11:13:14AM +0100, Matt Redfearn wrote:
> > Actually, this patch would be better inserted as patch 3 in the series 
> > since it can pull in the generic ashldi3 before the MIPS one is removed 
> > in the final patch. Here's an updated commit message:
> 
> Thanks Matt, applied.

Loongson1b/c defconfigs are still broken unfortunately. The .o files
aren't getting generated, apparently due to a different cmd_cc_o_c
definition when CONFIG_MODVERSIONS=y.

I'm gonna drop this patchset from 4.17. Hopefully an updated version can
be applied for 4.18 after the merge window.

Thanks
James


signature.asc
Description: Digital signature


Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-06 Thread James Hogan
On Thu, Apr 05, 2018 at 10:42:19PM +0100, James Hogan wrote:
> On Thu, Apr 05, 2018 at 11:13:14AM +0100, Matt Redfearn wrote:
> > Actually, this patch would be better inserted as patch 3 in the series 
> > since it can pull in the generic ashldi3 before the MIPS one is removed 
> > in the final patch. Here's an updated commit message:
> 
> Thanks Matt, applied.

Loongson1b/c defconfigs are still broken unfortunately. The .o files
aren't getting generated, apparently due to a different cmd_cc_o_c
definition when CONFIG_MODVERSIONS=y.

I'm gonna drop this patchset from 4.17. Hopefully an updated version can
be applied for 4.18 after the merge window.

Thanks
James


signature.asc
Description: Digital signature


Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-05 Thread James Hogan
On Thu, Apr 05, 2018 at 11:13:14AM +0100, Matt Redfearn wrote:
> Actually, this patch would be better inserted as patch 3 in the series 
> since it can pull in the generic ashldi3 before the MIPS one is removed 
> in the final patch. Here's an updated commit message:

Thanks Matt, applied.

Cheers
James


signature.asc
Description: Digital signature


Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-05 Thread James Hogan
On Thu, Apr 05, 2018 at 11:13:14AM +0100, Matt Redfearn wrote:
> Actually, this patch would be better inserted as patch 3 in the series 
> since it can pull in the generic ashldi3 before the MIPS one is removed 
> in the final patch. Here's an updated commit message:

Thanks Matt, applied.

Cheers
James


signature.asc
Description: Digital signature


Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-05 Thread Matt Redfearn

Hi James,

Actually, this patch would be better inserted as patch 3 in the series 
since it can pull in the generic ashldi3 before the MIPS one is removed 
in the final patch. Here's an updated commit message:


MIPS: vmlinuz: Use generic ashldi3 and build directly 




In preparation for removing some of the MIPS compiler intrinsics from 

arch/mips/lib, first update the build of vmlinuz to use the generic 

ashldi3 from lib. 




Both ashldi3 and bswapsi objects need to be built with different CFLAGS 

for inclusion to vmlinuz rather than simply including the object built 

for the main kernel image. But the current copy of the source C file to 

arch/mips/boot/compressed can be avoided by simply calling cmd,cc_o_c to 

build the object from the source directly. This also removes the need 

for the .gitignore file to ignore the copied files, and the extra-y rule 


to clean them.

Signed-off-by: Matt Redfearn 

Thanks,
Matt



On 04/04/18 10:18, Matt Redfearn wrote:

Since commit "MIPS: use generic GCC library routines from lib/", MIPS
now uses the generic lib/ashldi3.c, but bswapsi.c still comes from
arch/mips/lib. The rules for including these into vmlinuz need updating
to reflect these locations.
Both objects need to be built with different CFLAGS for inclusion to
vmlinuz rather than simply including the object built for the main
kernel image. But the copy of the source C file can be avoided by simply
calling cmd,cc_o_c to build the object from the source directly. This
also removes the need for the .gitignore file to ignore the copied
files, and the extra-y rule to clean them.

Signed-off-by: Matt Redfearn 
---

  arch/mips/boot/compressed/.gitignore | 2 --
  arch/mips/boot/compressed/Makefile   | 8 
  2 files changed, 4 insertions(+), 6 deletions(-)
  delete mode 100644 arch/mips/boot/compressed/.gitignore

diff --git a/arch/mips/boot/compressed/.gitignore 
b/arch/mips/boot/compressed/.gitignore
deleted file mode 100644
index ebae133f1d00..
--- a/arch/mips/boot/compressed/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ashldi3.c
-bswapsi.c
diff --git a/arch/mips/boot/compressed/Makefile 
b/arch/mips/boot/compressed/Makefile
index adce180f3ee4..8f04d659a915 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -46,10 +46,10 @@ $(obj)/uart-ath79.c: 
$(srctree)/arch/mips/ath79/early_printk.c
  
  vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
  
-extra-y += ashldi3.c bswapsi.c

-$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
-   $(call cmd,shipped)
+$(obj)/ashldi3.o: $(srctree)/lib/ashldi3.c
+   $(call cmd,cc_o_c)
+$(obj)/bswapsi.o: $(srctree)/arch/mips/lib/bswapsi.c
+   $(call cmd,cc_o_c)
  
  targets := $(notdir $(vmlinuzobjs-y))
  



Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-05 Thread Matt Redfearn

Hi James,

Actually, this patch would be better inserted as patch 3 in the series 
since it can pull in the generic ashldi3 before the MIPS one is removed 
in the final patch. Here's an updated commit message:


MIPS: vmlinuz: Use generic ashldi3 and build directly 




In preparation for removing some of the MIPS compiler intrinsics from 

arch/mips/lib, first update the build of vmlinuz to use the generic 

ashldi3 from lib. 




Both ashldi3 and bswapsi objects need to be built with different CFLAGS 

for inclusion to vmlinuz rather than simply including the object built 

for the main kernel image. But the current copy of the source C file to 

arch/mips/boot/compressed can be avoided by simply calling cmd,cc_o_c to 

build the object from the source directly. This also removes the need 

for the .gitignore file to ignore the copied files, and the extra-y rule 


to clean them.

Signed-off-by: Matt Redfearn 

Thanks,
Matt



On 04/04/18 10:18, Matt Redfearn wrote:

Since commit "MIPS: use generic GCC library routines from lib/", MIPS
now uses the generic lib/ashldi3.c, but bswapsi.c still comes from
arch/mips/lib. The rules for including these into vmlinuz need updating
to reflect these locations.
Both objects need to be built with different CFLAGS for inclusion to
vmlinuz rather than simply including the object built for the main
kernel image. But the copy of the source C file can be avoided by simply
calling cmd,cc_o_c to build the object from the source directly. This
also removes the need for the .gitignore file to ignore the copied
files, and the extra-y rule to clean them.

Signed-off-by: Matt Redfearn 
---

  arch/mips/boot/compressed/.gitignore | 2 --
  arch/mips/boot/compressed/Makefile   | 8 
  2 files changed, 4 insertions(+), 6 deletions(-)
  delete mode 100644 arch/mips/boot/compressed/.gitignore

diff --git a/arch/mips/boot/compressed/.gitignore 
b/arch/mips/boot/compressed/.gitignore
deleted file mode 100644
index ebae133f1d00..
--- a/arch/mips/boot/compressed/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ashldi3.c
-bswapsi.c
diff --git a/arch/mips/boot/compressed/Makefile 
b/arch/mips/boot/compressed/Makefile
index adce180f3ee4..8f04d659a915 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -46,10 +46,10 @@ $(obj)/uart-ath79.c: 
$(srctree)/arch/mips/ath79/early_printk.c
  
  vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
  
-extra-y += ashldi3.c bswapsi.c

-$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
-   $(call cmd,shipped)
+$(obj)/ashldi3.o: $(srctree)/lib/ashldi3.c
+   $(call cmd,cc_o_c)
+$(obj)/bswapsi.o: $(srctree)/arch/mips/lib/bswapsi.c
+   $(call cmd,cc_o_c)
  
  targets := $(notdir $(vmlinuzobjs-y))
  



[PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-04 Thread Matt Redfearn
Since commit "MIPS: use generic GCC library routines from lib/", MIPS
now uses the generic lib/ashldi3.c, but bswapsi.c still comes from
arch/mips/lib. The rules for including these into vmlinuz need updating
to reflect these locations.
Both objects need to be built with different CFLAGS for inclusion to
vmlinuz rather than simply including the object built for the main
kernel image. But the copy of the source C file can be avoided by simply
calling cmd,cc_o_c to build the object from the source directly. This
also removes the need for the .gitignore file to ignore the copied
files, and the extra-y rule to clean them.

Signed-off-by: Matt Redfearn 
---

 arch/mips/boot/compressed/.gitignore | 2 --
 arch/mips/boot/compressed/Makefile   | 8 
 2 files changed, 4 insertions(+), 6 deletions(-)
 delete mode 100644 arch/mips/boot/compressed/.gitignore

diff --git a/arch/mips/boot/compressed/.gitignore 
b/arch/mips/boot/compressed/.gitignore
deleted file mode 100644
index ebae133f1d00..
--- a/arch/mips/boot/compressed/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ashldi3.c
-bswapsi.c
diff --git a/arch/mips/boot/compressed/Makefile 
b/arch/mips/boot/compressed/Makefile
index adce180f3ee4..8f04d659a915 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -46,10 +46,10 @@ $(obj)/uart-ath79.c: 
$(srctree)/arch/mips/ath79/early_printk.c
 
 vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
 
-extra-y += ashldi3.c bswapsi.c
-$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
-   $(call cmd,shipped)
+$(obj)/ashldi3.o: $(srctree)/lib/ashldi3.c
+   $(call cmd,cc_o_c)
+$(obj)/bswapsi.o: $(srctree)/arch/mips/lib/bswapsi.c
+   $(call cmd,cc_o_c)
 
 targets := $(notdir $(vmlinuzobjs-y))
 
-- 
2.7.4



[PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly

2018-04-04 Thread Matt Redfearn
Since commit "MIPS: use generic GCC library routines from lib/", MIPS
now uses the generic lib/ashldi3.c, but bswapsi.c still comes from
arch/mips/lib. The rules for including these into vmlinuz need updating
to reflect these locations.
Both objects need to be built with different CFLAGS for inclusion to
vmlinuz rather than simply including the object built for the main
kernel image. But the copy of the source C file can be avoided by simply
calling cmd,cc_o_c to build the object from the source directly. This
also removes the need for the .gitignore file to ignore the copied
files, and the extra-y rule to clean them.

Signed-off-by: Matt Redfearn 
---

 arch/mips/boot/compressed/.gitignore | 2 --
 arch/mips/boot/compressed/Makefile   | 8 
 2 files changed, 4 insertions(+), 6 deletions(-)
 delete mode 100644 arch/mips/boot/compressed/.gitignore

diff --git a/arch/mips/boot/compressed/.gitignore 
b/arch/mips/boot/compressed/.gitignore
deleted file mode 100644
index ebae133f1d00..
--- a/arch/mips/boot/compressed/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ashldi3.c
-bswapsi.c
diff --git a/arch/mips/boot/compressed/Makefile 
b/arch/mips/boot/compressed/Makefile
index adce180f3ee4..8f04d659a915 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -46,10 +46,10 @@ $(obj)/uart-ath79.c: 
$(srctree)/arch/mips/ath79/early_printk.c
 
 vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
 
-extra-y += ashldi3.c bswapsi.c
-$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
-$(obj)/ashldi3.c $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c
-   $(call cmd,shipped)
+$(obj)/ashldi3.o: $(srctree)/lib/ashldi3.c
+   $(call cmd,cc_o_c)
+$(obj)/bswapsi.o: $(srctree)/arch/mips/lib/bswapsi.c
+   $(call cmd,cc_o_c)
 
 targets := $(notdir $(vmlinuzobjs-y))
 
-- 
2.7.4