1 diff -uNr compcache-0.5.3-org/sub-projects/compression/lzo-kmod/lzo1x_compress.c compcache-0.5.3/sub-projects/compression/lzo-kmod/lzo1x_compress.c
2 --- compcache-0.5.3-org/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2009-04-20 06:28:30.000000000 +0200
3 +++ compcache-0.5.3/sub-projects/compression/lzo-kmod/lzo1x_compress.c 2009-04-20 06:29:21.000000000 +0200
8 +#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
9 if (get_unaligned((const unsigned short *)m_pos)
10 == get_unaligned((const unsigned short *)ip)) {
12 + if (m_pos[0] == ip[0] && m_pos[1] == ip[1]) {
14 if (likely(m_pos[2] == ip[2]))
52 *op++ = M4_MARKER | 1;
55 MODULE_LICENSE("GPL");
56 MODULE_DESCRIPTION("LZO1X-1 Compressor");
58 diff -uNr compcache-0.5.3-org/sub-projects/compression/lzo-kmod/lzo1x_decompress.c compcache-0.5.3/sub-projects/compression/lzo-kmod/lzo1x_decompress.c
59 --- compcache-0.5.3-org/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2009-04-20 06:28:30.000000000 +0200
60 +++ compcache-0.5.3/sub-projects/compression/lzo-kmod/lzo1x_decompress.c 2009-04-20 06:29:21.000000000 +0200
63 if (HAVE_IP(t + 1, ip_end, ip))
68 - goto first_literal_run;
69 + goto prep_first_literal_run;
72 while ((ip < ip_end)) {
74 if (HAVE_IP(t + 4, ip_end, ip))
107 +prep_first_literal_run:
115 +//first_literal_run:
123 - m_pos -= le16_to_cpu(get_unaligned(
124 - (const unsigned short *)ip)) >> 2;
125 + m_pos -= get_unaligned_le16(ip) >> 2;
127 } else if (t >= 16) {
133 - m_pos -= le16_to_cpu(get_unaligned(
134 - (const unsigned short *)ip)) >> 2;
135 + m_pos -= get_unaligned_le16(ip) >> 2;
139 @@ -184,21 +176,33 @@
140 if (HAVE_OP(t + 3 - 1, op_end, op))
143 - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) {
149 + if (t >= 2 * 4 - (3 - 1)) {
151 + * Assume memcpy don't copy
152 + * more than 32 bytes at once
154 + if ((op - m_pos) >= 32) {
156 + memcpy(op, m_pos, t);
159 + } else if ((op - m_pos) >= 4) {