[lkml]   [2011]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36
From: "Bernhard R. Link" <>
Date: Mon, 17 Jan 2011 15:39:54 +0100

> * David Miller <> [110117 07:07]:
>> Ugh, and I just noticed that include/linux/klist.h does this fixed
>> alignment of "4" too, where is this stuff coming from? It's
>> wrong on 64-bit, at best. But I can't see the impetus behind doing
>> this at all in the first place.
> Is that actually misaligned? Unless I still mix things up, that is in the
> struct thus should be fine (i.e. the "d" case in my example above).

On CRIS, structs naturally align on a byte-boundary only.

However, code using klists encodes a binary state in the lowest bit of
klist pointers. So this assumes that the structures will be at least
2 byte aligned, which will not be true on CRIS.

We have a lot of other code which uses this trick (encoding 1 or 2
bits of binary state into the lowest bits of a pointer) so I'm
surprised this workaround isn't needed elsewhere for CRIS too.

 \ /
  Last update: 2011-01-18 06:27    [W:0.108 / U:38.676 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site