Pull misc fixes from Greg KH: "Here are three small fixes for 4.6-rc4. Two fix up some lz4 issues with big endian systems, and the remaining one resolves a minor debugfs issue that was reported. All have been in linux-next with no reported issues" * tag 'driver-core-4.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: lib: lz4: cleanup unaligned access efficiency detection lib: lz4: fixed zram with lz4 on big endian machines debugfs: Make automount point inodes permanently empty
Unified · Split
| @@ -457,7 +457,7 @@ struct dentry *debugfs_create_automount(const char *name, · 456 unmodified lines | |||
| 457 | if (unlikely(!inode)) | 457 | if (unlikely(!inode)) |
| 458 | return failed_creating(dentry); | 458 | return failed_creating(dentry); |
| 459 | 459 | ||
| 460 | inode->i_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO; | 460 | make_empty_dir_inode(inode); |
| 461 | inode->i_flags |= S_AUTOMOUNT; | 461 | inode->i_flags |= S_AUTOMOUNT; |
| 462 | inode->i_private = data; | 462 | inode->i_private = data; |
| 463 | dentry->d_fsdata = (void *)f; | 463 | dentry->d_fsdata = (void *)f; |
| @@ -11,8 +11,7 @@ · 10 unmodified lines | |||
| 11 | /* | 11 | /* |
| 12 | * Detects 64 bits mode | 12 | * Detects 64 bits mode |
| 13 | */ | 13 | */ |
| 14 | #if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) \ | 14 | #if defined(CONFIG_64BIT) |
| 15 | || defined(__ppc64__) || defined(__LP64__)) | ||
| 16 | #define LZ4_ARCH64 1 | 15 | #define LZ4_ARCH64 1 |
| 17 | #else | 16 | #else |
| 18 | #define LZ4_ARCH64 0 | 17 | #define LZ4_ARCH64 0 |
| @@ -25,9 +24,7 @@ · 6 unmodified lines | |||
| 25 | typedef struct _U16_S { u16 v; } U16_S; | 24 | typedef struct _U16_S { u16 v; } U16_S; |
| 26 | typedef struct _U32_S { u32 v; } U32_S; | 25 | typedef struct _U32_S { u32 v; } U32_S; |
| 27 | typedef struct _U64_S { u64 v; } U64_S; | 26 | typedef struct _U64_S { u64 v; } U64_S; |
| 28 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) \ | 27 | #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) |
| 29 | || defined(CONFIG_ARM) && __LINUX_ARM_ARCH__ >= 6 \ | ||
| 30 | && defined(ARM_EFFICIENT_UNALIGNED_ACCESS) | ||
| 31 | 28 | ||
| 32 | #define A16(x) (((U16_S *)(x))->v) | 29 | #define A16(x) (((U16_S *)(x))->v) |
| 33 | #define A32(x) (((U32_S *)(x))->v) | 30 | #define A32(x) (((U32_S *)(x))->v) |
| @@ -35,6 +32,10 @@ typedef struct _U64_S { u64 v; } U64_S; · 1 unmodified line | |||
| 35 | 32 | ||
| 36 | #define PUT4(s, d) (A32(d) = A32(s)) | 33 | #define PUT4(s, d) (A32(d) = A32(s)) |
| 37 | #define PUT8(s, d) (A64(d) = A64(s)) | 34 | #define PUT8(s, d) (A64(d) = A64(s)) |
| 35 | |||
| 36 | #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ | ||
| 37 | (d = s - A16(p)) | ||
| 38 | |||
| 38 | #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ | 39 | #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ |
| 39 | do { \ | 40 | do { \ |
| 40 | A16(p) = v; \ | 41 | A16(p) = v; \ |
| @@ -51,10 +52,13 @@ typedef struct _U64_S { u64 v; } U64_S; · 10 unmodified lines | |||
| 51 | #define PUT8(s, d) \ | 52 | #define PUT8(s, d) \ |
| 52 | put_unaligned(get_unaligned((const u64 *) s), (u64 *) d) | 53 | put_unaligned(get_unaligned((const u64 *) s), (u64 *) d) |
| 53 | 54 | ||
| 54 | #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ | 55 | #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ |
| 55 | do { \ | 56 | (d = s - get_unaligned_le16(p)) |
| 56 | put_unaligned(v, (u16 *)(p)); \ | 57 | |
| 57 | p += 2; \ | 58 | #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ |
| 59 | do { \ | ||
| 60 | put_unaligned_le16(v, (u16 *)(p)); \ | ||
| 61 | p += 2; \ | ||
| 58 | } while (0) | 62 | } while (0) |
| 59 | #endif | 63 | #endif |
| 60 | 64 | ||
| @@ -140,9 +144,6 @@ typedef struct _U64_S { u64 v; } U64_S; · 79 unmodified lines | |||
| 140 | 144 | ||
| 141 | #endif | 145 | #endif |
| 142 | 146 | ||
| 143 | #define LZ4_READ_LITTLEENDIAN_16(d, s, p) \ | ||
| 144 | (d = s - get_unaligned_le16(p)) | ||
| 145 | |||
| 146 | #define LZ4_WILDCOPY(s, d, e) \ | 147 | #define LZ4_WILDCOPY(s, d, e) \ |
| 147 | do { \ | 148 | do { \ |
| 148 | LZ4_COPYPACKET(s, d); \ | 149 | LZ4_COPYPACKET(s, d); \ |