[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sparc
Subject:    Re: [PATCH] sparc64: Move offset calculation of several structures to asm-offset.c
From:       David Miller <davem () davemloft ! net>
Date:       2013-03-23 23:49:03
Message-ID: 20130323.194903.518532142246973253.davem () davemloft ! net
[Download RAW message or body]

From: Kirill Tkhai <tkhai@yandex.ru>
Date: Sat, 23 Mar 2013 15:44:55 +0400

> 1)Calculate offset of members of thread_info, trap_per_cpu and tsb_config
> in asm-offset.c
> 2)Replace DEFINE(*, offsetof(...)) with OFFSET(...)
> 3)Inify using of asm-offset.h in header files
> 
> Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>

Things are done this way on purpose.

When the offsets change, I don't want the code to just automatically
adjust the assembler offset defines.

Instead, I want whoever changes things in this area to carefully
analyze the side effects.

For example, if anyone adds members, it now makes the trap block
larger than the power of 2 it currently is, and that means the
shift used to compute a cpu number to a trap block offset no
longer works.

Also, if members are moved, cache alignment of adjoining members
means that rearrangement must be done carefully.

This means, overall, nothing should happen automatically when
people make changes to the trap block.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic