Put minimum alignment on the dpcpu and vnet section so that ld
when adding the __start_ symbol knows the expected section alignment and can place the __start_ symbol correctly. These sections will not support symbols with super-cache line alignment requirements. For full details, see posting to freebsd-current, 2009-08-10, Message-ID: <20090810133111.C93661@maildrop.int.zabbadoz.net>. Debugging and testing patches by: Kamigishi Rei (spambox haruhiism.net), np, lstewart, jhb, kib, rwatson Tested by: Kamigishi Rei, lstewart Reviewed by: kib Approved by: re
This commit is contained in:
parent
d249e9c322
commit
d74deee9a1
@ -185,12 +185,14 @@ extern struct sx vnet_sxlock;
|
||||
* Virtual network stack memory allocator, which allows global variables to
|
||||
* be automatically instantiated for each network stack instance.
|
||||
*/
|
||||
__asm__(
|
||||
#if defined(__arm__)
|
||||
__asm__(".section " VNET_SETNAME ", \"aw\", %progbits");
|
||||
".section " VNET_SETNAME ", \"aw\", %progbits\n"
|
||||
#else
|
||||
__asm__(".section " VNET_SETNAME ", \"aw\", @progbits");
|
||||
".section " VNET_SETNAME ", \"aw\", @progbits\n"
|
||||
#endif
|
||||
__asm__(".previous");
|
||||
"\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n"
|
||||
"\t.previous");
|
||||
|
||||
#define VNET_NAME(n) vnet_entry_##n
|
||||
#define VNET_DECLARE(t, n) extern t VNET_NAME(n)
|
||||
|
@ -56,12 +56,14 @@ struct thread;
|
||||
extern uintptr_t *__start_set_pcpu;
|
||||
extern uintptr_t *__stop_set_pcpu;
|
||||
|
||||
__asm__(
|
||||
#if defined(__arm__)
|
||||
__asm__(".section set_pcpu, \"aw\", %progbits");
|
||||
".section set_pcpu, \"aw\", %progbits\n"
|
||||
#else
|
||||
__asm__(".section set_pcpu, \"aw\", @progbits");
|
||||
".section set_pcpu, \"aw\", @progbits\n"
|
||||
#endif
|
||||
__asm__(".previous");
|
||||
"\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n"
|
||||
"\t.previous");
|
||||
|
||||
/*
|
||||
* Array of dynamic pcpu base offsets. Indexed by id.
|
||||
|
Loading…
Reference in New Issue
Block a user