From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] adjust the alignment in struct sal_processor_static_info
Date: Thu, 05 Aug 2004 06:42:36 +0000 [thread overview]
Message-ID: <4111D6DC.5080006@jp.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
Hi all,
Struct ia64_fpreg(asm-ia64/fpu.h) is forced to align 16-byte.
An array of this struct is in struct sal_processor_static_info
(asm-ia64/sal.h), however, we can't touch the array correctly
because of the forced alignment.
Usually, SAL log record contains:
Record Header
- sizeof(sal_log_record_header_t) = 40
Section Header
- sizeof(sal_log_sec_hdr_t) = 24
Section Body(Processor Error Section)
- sizeof(before mod_error_info) = 32
- sizeof(sal_log_mod_error_info_t) = 48
- sizeof(sal_cpuid_info) = 48
- sizeof(sal_log_mod_error_info_t) = 48
- sizeof(sal_processor_static_info_t) = 5256
(offset of struct ia64_fpreg fr[0]
in sal_processor_static_info_t) = 3208
So, the total offset of fr[0] from beginning of the record is:
40 + 24 + 32 + 48*n + 48 + 3208
This number can't be divided by 16. fr[0] never fit to the
16-byte boundary because of the remainder.
This trivial patch will fix this issue.
Thanks,
H.Seto
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
[-- Attachment #2: patch-268rc3-sal --]
[-- Type: text/plain, Size: 459 bytes --]
diff -Nur linux-2.6.8-rc3/include/asm-ia64/sal.h linux-2.6.8-rc3-sal/include/asm-ia64/sal.h
--- linux-2.6.8-rc3/include/asm-ia64/sal.h 2004-08-04 06:28:48.000000000 +0900
+++ linux-2.6.8-rc3-sal/include/asm-ia64/sal.h 2004-08-04 18:05:58.365516395 +0900
@@ -364,7 +364,7 @@
u64 cr[128];
u64 ar[128];
u64 rr[8];
- struct ia64_fpreg fr[128];
+ struct ia64_fpreg __attribute__ ((packed)) fr[128];
} sal_processor_static_info_t;
struct sal_cpuid_info {
reply other threads:[~2004-08-05 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4111D6DC.5080006@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.