Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. Conflicts: net/mac80211/rx.c91535613b6("wifi: mac80211: don't drop all unprotected public action frames")6c02fab724("wifi: mac80211: split ieee80211_drop_unencrypted_mgmt() return value") Adjacent changes: drivers/net/ethernet/apm/xgene/xgene_enet_main.c61471264c0("net: ethernet: apm: Convert to platform remove callback returning void")d2ca43f306("net: xgene: Fix unused xgene_enet_of_match warning for !CONFIG_OF") net/vmw_vsock/virtio_transport.c64c99d2d6a("vsock/virtio: support to send non-linear skb")53b08c4985("vsock/virtio: initialize the_virtio_vsock before using VQs") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
#ifndef _TOOLS__RWSEM_H
|
||||
#define _TOOLS__RWSEM_H
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
struct rw_semaphore {
|
||||
pthread_rwlock_t lock;
|
||||
};
|
||||
|
||||
static inline int init_rwsem(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_init(&sem->lock, NULL);
|
||||
}
|
||||
|
||||
static inline int exit_rwsem(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_destroy(&sem->lock);
|
||||
}
|
||||
|
||||
static inline int down_read(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_rdlock(&sem->lock);
|
||||
}
|
||||
|
||||
static inline int up_read(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_unlock(&sem->lock);
|
||||
}
|
||||
|
||||
static inline int down_write(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_wrlock(&sem->lock);
|
||||
}
|
||||
|
||||
static inline int up_write(struct rw_semaphore *sem)
|
||||
{
|
||||
return pthread_rwlock_unlock(&sem->lock);
|
||||
}
|
||||
#endif /* _TOOLS_RWSEM_H */
|
||||
@@ -167,7 +167,9 @@ void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_
|
||||
__asm__ volatile (
|
||||
"xor %ebp, %ebp\n" /* zero the stack frame */
|
||||
"mov %esp, %eax\n" /* save stack pointer to %eax, as arg1 of _start_c */
|
||||
"and $-16, %esp\n" /* last pushed argument must be 16-byte aligned */
|
||||
"add $12, %esp\n" /* avoid over-estimating after the 'and' & 'sub' below */
|
||||
"and $-16, %esp\n" /* the %esp must be 16-byte aligned on 'call' */
|
||||
"sub $12, %esp\n" /* sub 12 to keep it aligned after the push %eax */
|
||||
"push %eax\n" /* push arg1 on stack to support plain stack modes too */
|
||||
"call _start_c\n" /* transfer to c runtime */
|
||||
"hlt\n" /* ensure it does not return */
|
||||
|
||||
@@ -13,6 +13,7 @@ const unsigned long *_auxv __attribute__((weak));
|
||||
static void __stack_chk_init(void);
|
||||
static void exit(int);
|
||||
|
||||
__attribute__((weak))
|
||||
void _start_c(long *sp)
|
||||
{
|
||||
long argc;
|
||||
|
||||
Reference in New Issue
Block a user