linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mkpiggy: Drop endianness transforming
@ 2018-11-09 12:19 Cao jin
  2018-11-09 13:00 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Cao jin @ 2018-11-09 12:19 UTC (permalink / raw)
  To: x86, linux-kernel; +Cc: tglx, mingo, bp, hpa

gzip file has 4-byte little-endian file size encoded at the end of file,
while all the other compressed kernel file has size_append operation in
the Makefile which also append the 4-byte little-endian file size. There
is no need to do endianness transforming by mkpiggy.

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---

A simple printf debug line before transformation also shows they are the
same among 6 compression.

 arch/x86/boot/compressed/Makefile  | 1 -
 arch/x86/boot/compressed/mkpiggy.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 466f66c8a7f8..8b2bcfd65920 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -58,7 +58,6 @@ endif
 LDFLAGS_vmlinux := -T
 
 hostprogs-y	:= mkpiggy
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include
 
 sed-voffset := -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(_text\|__bss_start\|_end\)$$/\#define VO_\2 _AC(0x\1,UL)/p'
 
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
index 72bad2c8debe..d5402fcd844a 100644
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -28,7 +28,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-#include <tools/le_byteshift.h>
 
 int main(int argc, char *argv[])
 {
@@ -61,7 +60,6 @@ int main(int argc, char *argv[])
 	}
 
 	ilen = ftell(f);
-	olen = get_unaligned_le32(&olen);
 
 	printf(".section \".rodata..compressed\",\"a\",@progbits\n");
 	printf(".globl z_input_len\n");
-- 
2.17.0




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

* Re: [PATCH] x86/mkpiggy: Drop endianness transforming
  2018-11-09 12:19 [PATCH] x86/mkpiggy: Drop endianness transforming Cao jin
@ 2018-11-09 13:00 ` Thomas Gleixner
  2018-11-10 10:39   ` Cao jin
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2018-11-09 13:00 UTC (permalink / raw)
  To: Cao jin; +Cc: x86, linux-kernel, mingo, bp, hpa

Cao,

On Fri, 9 Nov 2018, Cao jin wrote:

> gzip file has 4-byte little-endian file size encoded at the end of file,
> while all the other compressed kernel file has size_append operation in
> the Makefile which also append the 4-byte little-endian file size. There
> is no need to do endianness transforming by mkpiggy.

Did you test that on a BE host cross-compiling the kernel for x86?

Thanks,

	tglx

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

* Re: [PATCH] x86/mkpiggy: Drop endianness transforming
  2018-11-09 13:00 ` Thomas Gleixner
@ 2018-11-10 10:39   ` Cao jin
  0 siblings, 0 replies; 3+ messages in thread
From: Cao jin @ 2018-11-10 10:39 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: x86, linux-kernel, mingo, bp, hpa

On 11/9/18 9:00 PM, Thomas Gleixner wrote:
> Cao,
> 
> On Fri, 9 Nov 2018, Cao jin wrote:
> 
>> gzip file has 4-byte little-endian file size encoded at the end of file,
>> while all the other compressed kernel file has size_append operation in
>> the Makefile which also append the 4-byte little-endian file size. There
>> is no need to do endianness transforming by mkpiggy.
> 
> Did you test that on a BE host cross-compiling the kernel for x86?
> 

Oh, I don't know and never think of there is this kind of condition,
thanks for your info and sorry for the noise.

Sincerely,
Cao jin



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

end of thread, other threads:[~2018-11-10 10:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 12:19 [PATCH] x86/mkpiggy: Drop endianness transforming Cao jin
2018-11-09 13:00 ` Thomas Gleixner
2018-11-10 10:39   ` Cao jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).