* [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global
@ 2013-08-05 22:18 Andi Kleen
2013-08-05 22:33 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2013-08-05 22:18 UTC (permalink / raw)
To: netdev; +Cc: Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
- Inline assembler defining C callable code has to be global
- The function has to be visible
Do this in wan/sbni
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
drivers/net/wan/sbni.c | 6 +++---
drivers/net/wan/sbni.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index d43f4ef..b914ab3 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -160,7 +160,7 @@ static int scandone __initdata = 0;
static int num __initdata = 0;
static unsigned char rxl_tab[];
-static u32 crc32tab[];
+__visible u32 sbni_crc32tab[];
/* A list of all installed devices, for removing the driver module. */
static struct net_device *sbni_cards[ SBNI_MAX_NUM_CARDS ];
@@ -1563,7 +1563,7 @@ calc_crc32( u32 crc, u8 *p, u32 len )
"xorl %%ebx, %%ebx\n"
"movl %2, %%esi\n"
"movl %3, %%ecx\n"
- "movl $crc32tab, %%edi\n"
+ "movl $sbni_crc32tab, %%edi\n"
"shrl $2, %%ecx\n"
"jz 1f\n"
@@ -1645,7 +1645,7 @@ calc_crc32( u32 crc, u8 *p, u32 len )
#endif /* ASM_CRC */
-static u32 crc32tab[] __attribute__ ((aligned(8))) = {
+__visible u32 sbni_crc32tab[] __attribute__ ((aligned(8))) = {
0xD202EF8D, 0xA505DF1B, 0x3C0C8EA1, 0x4B0BBE37,
0xD56F2B94, 0xA2681B02, 0x3B614AB8, 0x4C667A2E,
0xDCD967BF, 0xABDE5729, 0x32D70693, 0x45D03605,
diff --git a/drivers/net/wan/sbni.h b/drivers/net/wan/sbni.h
index 8426451..7e6d980 100644
--- a/drivers/net/wan/sbni.h
+++ b/drivers/net/wan/sbni.h
@@ -132,7 +132,7 @@ struct sbni_flags {
/*
* CRC-32 stuff
*/
-#define CRC32(c,crc) (crc32tab[((size_t)(crc) ^ (c)) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF))
+#define CRC32(c,crc) (sbni_crc32tab[((size_t)(crc) ^ (c)) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF))
/* CRC generator 0xEDB88320 */
/* CRC remainder 0x2144DF1C */
/* CRC initial value 0x00000000 */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global
2013-08-05 22:18 [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
@ 2013-08-05 22:33 ` David Miller
2013-08-05 23:05 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-08-05 22:33 UTC (permalink / raw)
To: andi; +Cc: netdev, ak
From: Andi Kleen <andi@firstfloor.org>
Date: Mon, 5 Aug 2013 15:18:14 -0700
> From: Andi Kleen <ak@linux.intel.com>
>
> - Inline assembler defining C callable code has to be global
> - The function has to be visible
>
> Do this in wan/sbni
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Please just make it use the standard lib/ CRC routines instead.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global
2013-08-05 22:33 ` David Miller
@ 2013-08-05 23:05 ` Andi Kleen
2013-08-05 23:09 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2013-08-05 23:05 UTC (permalink / raw)
To: David Miller; +Cc: andi, netdev, ak
On Mon, Aug 05, 2013 at 03:33:23PM -0700, David Miller wrote:
> From: Andi Kleen <andi@firstfloor.org>
> Date: Mon, 5 Aug 2013 15:18:14 -0700
>
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > - Inline assembler defining C callable code has to be global
> > - The function has to be visible
> >
> > Do this in wan/sbni
> >
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> Please just make it use the standard lib/ CRC routines instead.
The problem is I don't have this hardware, and I don't think
I can do such a change without testing it.
FWIW my main interest here is to avoid this thing breaking
my allyesconfig build.
Could you please consider adding it?
If not I'll have to disable the driver in the LTO patchkit.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global
2013-08-05 23:05 ` Andi Kleen
@ 2013-08-05 23:09 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-08-05 23:09 UTC (permalink / raw)
To: andi; +Cc: netdev, ak
From: Andi Kleen <andi@firstfloor.org>
Date: Tue, 6 Aug 2013 01:05:35 +0200
> On Mon, Aug 05, 2013 at 03:33:23PM -0700, David Miller wrote:
>> From: Andi Kleen <andi@firstfloor.org>
>> Date: Mon, 5 Aug 2013 15:18:14 -0700
>>
>> > From: Andi Kleen <ak@linux.intel.com>
>> >
>> > - Inline assembler defining C callable code has to be global
>> > - The function has to be visible
>> >
>> > Do this in wan/sbni
>> >
>> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>>
>> Please just make it use the standard lib/ CRC routines instead.
>
> The problem is I don't have this hardware, and I don't think
> I can do such a change without testing it.
I say you can, having assembly in here for something as fundamental
as this is pointless.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-05 23:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 22:18 [PATCH] lto, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
2013-08-05 22:33 ` David Miller
2013-08-05 23:05 ` Andi Kleen
2013-08-05 23:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).