All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Redfearn <matt.redfearn@mips.com>
To: James Hogan <jhogan@kernel.org>, Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>, Alban Bedel <albeu@free.fr>,
	Antony Pavlov <antonynpavlov@gmail.com>,
	Palmer Dabbelt <palmer@sifive.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly
Date: Thu, 5 Apr 2018 11:13:14 +0100	[thread overview]
Message-ID: <b05a0ec9-d052-49c7-3e8f-2ba233d84f03@mips.com> (raw)
In-Reply-To: <1522833502-28007-1-git-send-email-matt.redfearn@mips.com>

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 <matt.redfearn@mips.com>

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 <matt.redfearn@mips.com>
> ---
> 
>   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..000000000000
> --- 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))
>   
> 

WARNING: multiple messages have this Message-ID (diff)
From: Matt Redfearn <matt.redfearn@mips.com>
To: James Hogan <jhogan@kernel.org>, Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, Alban Bedel <albeu@free.fr>,
	Antony Pavlov <antonynpavlov@gmail.com>,
	Palmer Dabbelt <palmer@sifive.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly
Date: Thu, 5 Apr 2018 11:13:14 +0100	[thread overview]
Message-ID: <b05a0ec9-d052-49c7-3e8f-2ba233d84f03@mips.com> (raw)
Message-ID: <20180405101314.9k2ks_Gu8fHVjn42OnXkspDEwMa2ytrWQ67Wz0R39lY@z> (raw)
In-Reply-To: <1522833502-28007-1-git-send-email-matt.redfearn@mips.com>

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 <matt.redfearn@mips.com>

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 <matt.redfearn@mips.com>
> ---
> 
>   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..000000000000
> --- 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))
>   
> 

  reply	other threads:[~2018-04-05 10:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  9:24 [PATCH v5 1/3] Add notrace to lib/ucmpdi2.c Matt Redfearn
2018-04-03  9:24 ` Matt Redfearn
2018-04-03  9:24 ` [PATCH v5 2/3] lib: Rename compiler intrinsic selects to GENERIC_LIB_* Matt Redfearn
2018-04-03  9:24   ` Matt Redfearn
2018-04-03  9:24   ` Matt Redfearn
2018-04-03 22:39   ` Palmer Dabbelt
2018-04-03 22:39     ` Palmer Dabbelt
2018-04-03 22:39     ` Palmer Dabbelt
2018-04-04 22:02     ` James Hogan
2018-04-04 22:02       ` James Hogan
2018-04-05  0:14       ` Palmer Dabbelt
2018-04-05  0:14         ` Palmer Dabbelt
2018-04-03  9:24 ` [PATCH v5 3/3] MIPS: use generic GCC library routines from lib/ Matt Redfearn
2018-04-03  9:24   ` Matt Redfearn
2018-04-03 16:07   ` James Hogan
2018-04-04  9:18     ` [PATCH] MIPS: vmlinuz: Fix compiler intrinsics location and build directly Matt Redfearn
2018-04-04  9:18       ` Matt Redfearn
2018-04-05 10:13       ` Matt Redfearn [this message]
2018-04-05 10:13         ` Matt Redfearn
2018-04-05 21:42         ` James Hogan
2018-04-06 23:09           ` James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b05a0ec9-d052-49c7-3e8f-2ba233d84f03@mips.com \
    --to=matt.redfearn@mips.com \
    --cc=albeu@free.fr \
    --cc=antonynpavlov@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=palmer@sifive.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.