Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179221
b: refs/heads/master
c: 6846ee5
h: refs/heads/master
i:
  179219: d4c4832
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Jan 14, 2010
1 parent d894cac commit f55f9ff
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8866f9df4a5b91a4e514ccc76472261a644a3848
refs/heads/master: 6846ee5ca68d81e6baccf0d56221d7a00c1be18b
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
all: $(obj)/zImage

BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -Os -msoft-float -pipe -D__KERNEL__\
-fno-strict-aliasing -Os -msoft-float -pipe \
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
-isystem $(shell $(CROSS32CC) -print-file-name=include)
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
Expand All @@ -34,8 +34,6 @@ BOOTCFLAGS += -fno-stack-protector
endif

BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
BOOTCFLAGS += -include include/linux/autoconf.h -Iarch/powerpc/include
BOOTCFLAGS += -Iinclude

DTS_FLAGS ?= -p 1024

Expand Down
32 changes: 30 additions & 2 deletions trunk/lib/zlib_inflate/inffast.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@
*/

#include <linux/zutil.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"

/* Only do the unaligned "Faster" variant when
* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set
*
* On powerpc, it won't be as we don't include autoconf.h
* automatically for the boot wrapper, which is intended as
* we run in an environment where we may not be able to deal
* with (even rare) alignment faults. In addition, we do not
* define __KERNEL__ for arch/powerpc/boot unlike x86
*/

#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
#include <asm/unaligned.h>
#include <asm/byteorder.h>
#endif

#ifndef ASMINF

/* Allow machine dependent optimization for post-increment or pre-increment.
Expand Down Expand Up @@ -243,6 +256,7 @@ void inflate_fast(z_streamp strm, unsigned start)
}
}
else {
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
unsigned short *sout;
unsigned long loops;

Expand Down Expand Up @@ -284,6 +298,20 @@ void inflate_fast(z_streamp strm, unsigned start)
}
if (len & 1)
PUP(out) = PUP(from);
#else /* CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
from = out - dist; /* copy direct from output */
do { /* minimum length is three */
PUP(out) = PUP(from);
PUP(out) = PUP(from);
PUP(out) = PUP(from);
len -= 3;
} while (len > 2);
if (len) {
PUP(out) = PUP(from);
if (len > 1)
PUP(out) = PUP(from);
}
#endif /* !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS */
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
Expand Down

0 comments on commit f55f9ff

Please sign in to comment.