mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
[PATCH] Common compat_sys_sysinfo
I noticed that almost all architectures implemented exactly the same sys32_sysinfo... except parisc, where a bug was to be found in handling of the uptime. So let's remove a whole whack of code for fun and profit. Cribbed compat_sys_sysinfo from x86_64's implementation, since I figured it would be the best tested. This patch incorporates Arnd's suggestion of not using set_fs/get_fs, but instead extracting out the common code from sys_sysinfo. Cc: Christoph Hellwig <hch@infradead.org> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
72fd4a35a8
commit
d4d23add3a
18 changed files with 112 additions and 453 deletions
|
@ -313,6 +313,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
|
|||
(void)__tmp; \
|
||||
})
|
||||
|
||||
struct sysinfo;
|
||||
extern int do_sysinfo(struct sysinfo *info);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#define SI_LOAD_SHIFT 16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue