Skip to content

Commit 6e7765c

Browse files
committed
Merge tag 'asm-generic-fixes-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic fixes from Arnd Bergmann: "Two more bug fixes for asm-generic, one addressing an incorrect Kconfig symbol reference and another one fixing a build failure for the perf tool on mips and possibly others" * tag 'asm-generic-fixes-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: remove a broken and needless ifdef conditional tools: Fixed MIPS builds due to struct flock re-definition
2 parents 9d8a861 + e2a619c commit 6e7765c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

include/asm-generic/io.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,9 +1125,7 @@ static inline void memcpy_toio(volatile void __iomem *addr, const void *buffer,
11251125
}
11261126
#endif
11271127

1128-
#ifndef CONFIG_GENERIC_DEVMEM_IS_ALLOWED
11291128
extern int devmem_is_allowed(unsigned long pfn);
1130-
#endif
11311129

11321130
#endif /* __KERNEL__ */
11331131

include/uapi/asm-generic/fcntl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ struct f_owner_ex {
192192

193193
#define F_LINUX_SPECIFIC_BASE 1024
194194

195+
#ifndef HAVE_ARCH_STRUCT_FLOCK
195196
struct flock {
196197
short l_type;
197198
short l_whence;
@@ -216,5 +217,6 @@ struct flock64 {
216217
__ARCH_FLOCK64_PAD
217218
#endif
218219
};
220+
#endif /* HAVE_ARCH_STRUCT_FLOCK */
219221

220222
#endif /* _ASM_GENERIC_FCNTL_H */

tools/include/uapi/asm-generic/fcntl.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
12
#ifndef _ASM_GENERIC_FCNTL_H
23
#define _ASM_GENERIC_FCNTL_H
34

@@ -90,7 +91,7 @@
9091

9192
/* a horrid kludge trying to make sure that this will fail on old kernels */
9293
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
93-
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
94+
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
9495

9596
#ifndef O_NDELAY
9697
#define O_NDELAY O_NONBLOCK
@@ -115,11 +116,13 @@
115116
#define F_GETSIG 11 /* for sockets. */
116117
#endif
117118

119+
#if __BITS_PER_LONG == 32 || defined(__KERNEL__)
118120
#ifndef F_GETLK64
119121
#define F_GETLK64 12 /* using 'struct flock64' */
120122
#define F_SETLK64 13
121123
#define F_SETLKW64 14
122124
#endif
125+
#endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */
123126

124127
#ifndef F_SETOWN_EX
125128
#define F_SETOWN_EX 15
@@ -178,13 +181,18 @@ struct f_owner_ex {
178181
blocking */
179182
#define LOCK_UN 8 /* remove lock */
180183

184+
/*
185+
* LOCK_MAND support has been removed from the kernel. We leave the symbols
186+
* here to not break legacy builds, but these should not be used in new code.
187+
*/
181188
#define LOCK_MAND 32 /* This is a mandatory flock ... */
182189
#define LOCK_READ 64 /* which allows concurrent read operations */
183190
#define LOCK_WRITE 128 /* which allows concurrent write operations */
184191
#define LOCK_RW 192 /* which allows concurrent read & write ops */
185192

186193
#define F_LINUX_SPECIFIC_BASE 1024
187194

195+
#ifndef HAVE_ARCH_STRUCT_FLOCK
188196
struct flock {
189197
short l_type;
190198
short l_whence;
@@ -209,5 +217,6 @@ struct flock64 {
209217
__ARCH_FLOCK64_PAD
210218
#endif
211219
};
220+
#endif /* HAVE_ARCH_STRUCT_FLOCK */
212221

213222
#endif /* _ASM_GENERIC_FCNTL_H */

0 commit comments

Comments
 (0)