From: Michal Simek <monstr@monstr.eu>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, john.williams@petalogix.com
Subject: Re: [PATCH 29/30] microblaze_mmu_v1: stat.h MMU update
Date: Mon, 27 Apr 2009 14:31:46 +0200 [thread overview]
Message-ID: <49F5A5B2.7000307@monstr.eu> (raw)
In-Reply-To: <200904271357.01681.arnd@arndb.de>
Arnd Bergmann wrote:
> On Monday 27 April 2009, Michal Simek wrote:
>> Christoph Hellwig wrote:
>
>>> Given that microblaze only got merged in the 2.6.30 window I would
>>> suggest fixing up the nommu variant.
>> ok. Let's do it.
>> Here are stats structures from xtensa.
>>
>> Arnd: Is it ok for asm-generic?
>
> I carry a (not cleaned up) tree with changes in my playground
> (git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git)
> as branch generic-microblaze, where I try to use generic
> headers for everything. See below for my version of stat.h.
> In particular, it uses 64 bit st_size and st_blocks, but 32 bit
> time fields. It also defines struct stat to be identical to
> struct stat64 on 64 bit systems. 32 bit systems should only
> provide the stat64 syscalls, so the shorter types in struct
> stat do not hurt.
>
> Arnd <><
>
> ---
> #ifndef __ASM_GENERIC_STAT_H
> #define __ASM_GENERIC_STAT_H
>
> /*
> * Everybody gets this wrong and has to stick with it for all
> * eternity. Hopefully, this version gets used by new architectures
> * so they don't fall into the same traps.
> *
> * stat64 is copied from powerpc64, with explicit padding added.
> * stat is the same structure layout on 64-bit, without the 'long long'
> * types.
> *
> * By convention, 64 bit architectures use the stat interface, while
> * 32 bit architectures use the stat64 interface. Note that we don't
> * provide an __old_kernel_stat here, which new architecture should
> * not have to start with.
> */
>
> #include <asm/bitsperlong.h>
>
> #define STAT_HAVE_NSEC 1
>
> struct stat {
> unsigned long st_dev; /* Device. */
> unsigned long st_ino; /* File serial number. */
> unsigned int st_mode; /* File mode. */
> unsigned int st_nlink; /* Link count. */
> unsigned int st_uid; /* User ID of the file's owner. */
> unsigned int st_gid; /* Group ID of the file's group. */
> unsigned long st_rdev; /* Device number, if device. */
> unsigned long __pad1;
> long st_size; /* Size of file, in bytes. */
Maybe unsigned? Make more sense to me that file size is not minus.
And for some types below.
Michal
> int st_blksize; /* Optimal block size for I/O. */
> int __pad2;
> long st_blocks; /* Number 512-byte blocks allocated. */
> int st_atime; /* Time of last access. */
> unsigned int st_atime_nsec;
> int st_mtime; /* Time of last modification. */
> unsigned int st_mtime_nsec;
> int st_ctime; /* Time of last status change. */
> unsigned int st_ctime_nsec;
> unsigned int __unused4;
> unsigned int __unused5;
> };
>
> #if __BITS_PER_LONG != 64
> /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
> struct stat64 {
> unsigned long long st_dev; /* Device. */
> unsigned long long st_ino; /* File serial number. */
> unsigned int st_mode; /* File mode. */
> unsigned int st_nlink; /* Link count. */
> unsigned int st_uid; /* User ID of the file's owner. */
> unsigned int st_gid; /* Group ID of the file's group. */
> unsigned long long st_rdev; /* Device number, if device. */
> unsigned long long __pad1;
> long long st_size; /* Size of file, in bytes. */
> int st_blksize; /* Optimal block size for I/O. */
> int __pad2;
> long long st_blocks; /* Number 512-byte blocks allocated. */
> int st_atime; /* Time of last access. */
> unsigned int st_atime_nsec;
> int st_mtime; /* Time of last modification. */
> unsigned int st_mtime_nsec;
> int st_ctime; /* Time of last status change. */
> unsigned int st_ctime_nsec;
> unsigned int __unused4;
> unsigned int __unused5;
> };
> #endif
>
> #endif /* __ASM_GENERIC_STAT_H */
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
next prev parent reply other threads:[~2009-04-27 12:32 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 8:31 Microblaze MMU patches monstr
2009-04-27 8:31 ` [PATCH 01/30] microblaze_mmu_v1: Makefiles monstr
2009-04-27 8:31 ` [PATCH 02/30] microblaze_mmu_v1: Kconfig update monstr
2009-04-27 8:31 ` [PATCH 03/30] microblaze_mmu_v1: Add mmu_defconfig monstr
2009-04-27 8:31 ` [PATCH 04/30] microblaze_mmu_v1: MMU update for startup code monstr
2009-04-27 8:31 ` [PATCH 05/30] microblaze_mmu_v1: Alocate TLB for early console monstr
2009-04-27 8:31 ` [PATCH 06/30] microblaze_mmu_v1: TLB low level code monstr
2009-04-27 8:31 ` [PATCH 07/30] microblaze_mmu_v1: MMU initialization monstr
2009-04-27 8:31 ` [PATCH 08/30] microblaze_mmu_v1: mmu.h update monstr
2009-04-27 8:31 ` [PATCH 09/30] microblaze_mmu_v1: Page fault handling high level - fault.c monstr
2009-04-27 8:31 ` [PATCH 10/30] microblaze_mmu_v1: Context handling - mmu_context.c/h monstr
2009-04-27 8:32 ` [PATCH 11/30] microblaze_mmu_v1: Page table - ioremap - pgtable.c/h, section update monstr
2009-04-27 8:32 ` [PATCH 12/30] microblaze_mmu_v1: io.h MMU update monstr
2009-04-27 8:32 ` [PATCH 13/30] microblaze_mmu_v1: pgalloc.h and page.h monstr
2009-04-27 8:32 ` [PATCH 14/30] microblaze_mmu_v1: Update process creation for MMU monstr
2009-04-27 8:32 ` [PATCH 15/30] microblaze_mmu_v1: Update tlb.h and tlbflush.h monstr
2009-04-27 8:32 ` [PATCH 16/30] microblaze_mmu_v1: MMU asm offset update monstr
2009-04-27 8:32 ` [PATCH 17/30] microblaze_mmu_v1: Add CURRENT_TASK for entry.S monstr
2009-04-27 8:32 ` [PATCH 18/30] microblaze_mmu_v1: entry.S, entry.h monstr
2009-04-27 8:32 ` [PATCH 19/30] microblaze_mmu_v1: Update exception handling - MMU exception monstr
2009-04-27 8:32 ` [PATCH 20/30] microblaze_mmu_v1: uaccess MMU update monstr
2009-04-27 8:32 ` [PATCH 21/30] microblaze_mmu_v1: Add MMU related exceptions handling monstr
2009-04-27 8:32 ` [PATCH 22/30] microblaze_mmu_v1: Update linker script for MMU monstr
2009-04-27 8:32 ` [PATCH 23/30] microblaze_mmu_v1: Enable fork syscall for MMU and add fork as vfork for noMMU monstr
2009-04-27 8:32 ` [PATCH 24/30] microblaze_mmu_v1: Traps MMU update monstr
2009-04-27 8:32 ` [PATCH 25/30] microblaze_mmu_v1: Update signal returning address monstr
2009-04-27 8:32 ` [PATCH 26/30] microblaze_mmu_v1: Update cacheflush.h monstr
2009-04-27 8:32 ` [PATCH 27/30] microblaze_mmu_v1: Update dma.h for MMU monstr
2009-04-27 8:32 ` [PATCH 28/30] microblaze_mmu_v1: Elf update monstr
2009-04-27 8:32 ` [PATCH 29/30] microblaze_mmu_v1: stat.h MMU update monstr
2009-04-27 8:32 ` [PATCH 30/30] microblaze_mmu_v1: fcntl.h " monstr
2009-04-27 9:59 ` Christoph Hellwig
2009-04-27 10:05 ` John Williams
2009-04-27 10:56 ` Michal Simek
2009-04-27 9:58 ` [PATCH 29/30] microblaze_mmu_v1: stat.h " Christoph Hellwig
2009-04-27 10:35 ` Michal Simek
2009-04-27 11:30 ` Christoph Hellwig
2009-04-27 11:43 ` Michal Simek
2009-04-27 11:57 ` Arnd Bergmann
2009-04-27 12:15 ` Sam Ravnborg
2009-04-27 12:37 ` Arnd Bergmann
2009-04-27 12:48 ` Sam Ravnborg
2009-04-27 12:55 ` Arnd Bergmann
2009-04-27 12:31 ` Michal Simek [this message]
2009-04-27 12:42 ` Arnd Bergmann
2009-04-27 12:44 ` Michal Simek
2009-04-27 12:47 ` Arnd Bergmann
2009-04-27 12:48 ` Michal Simek
2009-04-30 13:53 ` Arnd Bergmann
2009-04-30 14:10 ` Michal Simek
2009-04-30 14:40 ` Arnd Bergmann
2009-04-30 14:51 ` Michal Simek
2009-04-27 12:53 ` Arnd Bergmann
2009-04-27 13:03 ` Michal Simek
2009-04-27 13:13 ` Arnd Bergmann
2009-04-27 11:43 ` [PATCH 23/30] microblaze_mmu_v1: Enable fork syscall for MMU and add fork as vfork for noMMU John Williams
2009-04-29 10:16 ` Michal Simek
2009-04-29 11:31 ` Arnd Bergmann
2009-04-29 11:27 ` [PATCH 22/30] microblaze_mmu_v1: Update linker script for MMU Arnd Bergmann
2009-04-29 11:39 ` Michal Simek
2009-04-29 5:54 ` [PATCH 21/30] microblaze_mmu_v1: Add MMU related exceptions handling Andrew Morton
2009-04-29 9:36 ` Michal Simek
2009-04-29 5:53 ` [PATCH 20/30] microblaze_mmu_v1: uaccess MMU update Andrew Morton
2009-04-29 10:12 ` Michal Simek
2009-04-29 10:58 ` Arnd Bergmann
2009-04-29 15:19 ` Michal Simek
2009-04-29 15:35 ` Arnd Bergmann
2009-04-29 15:43 ` Michal Simek
2009-04-29 15:55 ` Arnd Bergmann
2009-04-29 11:26 ` Arnd Bergmann
2009-04-27 10:55 ` [PATCH 10/30] microblaze_mmu_v1: Context handling - mmu_context.c/h Arnd Bergmann
2009-04-27 11:18 ` Geert Uytterhoeven
2009-04-29 5:46 ` [PATCH 09/30] microblaze_mmu_v1: Page fault handling high level - fault.c Andrew Morton
2009-04-29 9:30 ` Michal Simek
2009-04-29 5:44 ` [PATCH 08/30] microblaze_mmu_v1: mmu.h update Andrew Morton
2009-04-29 9:28 ` Michal Simek
2009-04-29 5:42 ` [PATCH 07/30] microblaze_mmu_v1: MMU initialization Andrew Morton
2009-04-29 7:02 ` Michal Simek
2009-04-29 8:42 ` Michal Simek
2009-04-27 10:50 ` [PATCH 01/30] microblaze_mmu_v1: Makefiles Arnd Bergmann
2009-04-27 10:54 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F5A5B2.7000307@monstr.eu \
--to=monstr@monstr.eu \
--cc=arnd@arndb.de \
--cc=hch@infradead.org \
--cc=john.williams@petalogix.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox