Merge branch 'android11-5.4' into android11-5.4-lts
Catch up with a few commits in android11-5.4 to hopefully "unbreak" gerrit as it is confused a bit with the branches being able to be cleanly "fast-forwarded" at the moment. Changes in here include the following: *a820058846Revert "UPSTREAM: unicode: Don't special case ignorable code points" *8ee3ff6010Merge tag 'android11-5.4.286_r00' into android11-5.4 *ac5c9c9bf3UPSTREAM: net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT *e3a8df3001ANDROID: add file for recording allowed ABI breaks *0215dc2885ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER *f06e9ec979BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics *fd0bf47f62UPSTREAM: x86/percpu: Clean up percpu_add_op() *cdc0c697abUPSTREAM: x86/percpu: Clean up percpu_from_op() *c35e6d0025UPSTREAM: x86/percpu: Clean up percpu_to_op() *3cd2aa357fUPSTREAM: x86/percpu: Introduce size abstraction macros *fd66950d54BACKPORT: FROMGIT: binder: add delivered_freeze to debugfs output *d7f2e2600fBACKPORT: FROMGIT: binder: fix memleak of proc->delivered_freeze *00553a4558FROMGIT: binder: allow freeze notification for dead nodes *44e90a1218FROMGIT: binder: fix BINDER_WORK_CLEAR_FREEZE_NOTIFICATION debug logs *4942a6719aFROMGIT: binder: fix BINDER_WORK_FROZEN_BINDER debug logs *dd5ff84365BACKPORT: FROMGIT: binder: fix freeze UAF in binder_release_work() *6953269824FROMGIT: binder: fix OOB in binder_add_freeze_work() *b6005f2f2cFROMGIT: binder: fix node UAF in binder_add_freeze_work() *069e12986fANDROID: GKI: Enable SERIAL_8250_DW *acda6f3281UPSTREAM: USB: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format Change-Id: I70df16a9075c4cf9e0bafdc129f0a7a0f6b79d0f Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
4ed1e6725b
10 changed files with 3685 additions and 3535 deletions
98
android/abi_gki_aarch64.xml.allowed_breaks
Normal file
98
android/abi_gki_aarch64.xml.allowed_breaks
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
# How to use this file: http://go/approve-abi-break
|
||||
# ABI freeze commit: ae37e86392ba5e33dc178c5ca16096029a2a3fe1
|
||||
|
||||
11 function symbol(s) removed
|
||||
'struct phy_device* of_phy_find_device(struct device_node*)'
|
||||
'int reset_control_status(struct reset_control*)'
|
||||
'void rproc_add_carveout(struct rproc*, struct rproc_mem_entry*)'
|
||||
'void* rproc_da_to_va(struct rproc*, u64, int)'
|
||||
'struct resource_table* rproc_elf_find_loaded_rsc_table(struct rproc*, const struct firmware*)'
|
||||
'int rproc_elf_load_rsc_table(struct rproc*, const struct firmware*)'
|
||||
'int rproc_elf_load_segments(struct rproc*, const struct firmware*)'
|
||||
'int rproc_elf_sanity_check(struct rproc*, const struct firmware*)'
|
||||
'struct rproc_mem_entry* rproc_mem_entry_init(struct device*, void*, dma_addr_t, int, u32, int(*)(struct rproc*, struct rproc_mem_entry*), int(*)(struct rproc*, struct rproc_mem_entry*), const char*, ...)'
|
||||
'struct rproc_mem_entry* rproc_of_resm_mem_entry_init(struct device*, u32, int, u32, const char*, ...)'
|
||||
'irqreturn_t rproc_vq_interrupt(struct rproc*, int)'
|
||||
|
||||
type 'struct elevator_mq_ops' changed
|
||||
member changed from 'bool(* bio_merge)(struct blk_mq_hw_ctx*, struct bio*, unsigned int)' to 'bool(* bio_merge)(struct request_queue*, struct bio*, unsigned int)'
|
||||
type changed from 'bool(*)(struct blk_mq_hw_ctx*, struct bio*, unsigned int)' to 'bool(*)(struct request_queue*, struct bio*, unsigned int)'
|
||||
pointed-to type changed from 'bool(struct blk_mq_hw_ctx*, struct bio*, unsigned int)' to 'bool(struct request_queue*, struct bio*, unsigned int)'
|
||||
parameter 1 type changed from 'struct blk_mq_hw_ctx*' to 'struct request_queue*'
|
||||
pointed-to type changed from 'struct blk_mq_hw_ctx' to 'struct request_queue'
|
||||
|
||||
type 'struct usbnet' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { struct { u32 rx_speed; u32 tx_speed; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct inet_connection_sock' changed
|
||||
member changed from 'struct { int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp; } icsk_mtup' to 'struct { int search_high; int search_low; int enabled; int probe_size; u32 probe_timestamp; } icsk_mtup'
|
||||
type changed from 'struct { int enabled; int search_high; int search_low; int probe_size; u32 probe_timestamp; }' to 'struct { int search_high; int search_low; int enabled; int probe_size; u32 probe_timestamp; }'
|
||||
byte size changed from 20 to 16
|
||||
2 members ('int search_high' .. 'int search_low') changed
|
||||
offset changed by -32
|
||||
member 'int probe_size' changed
|
||||
offset changed by -95
|
||||
member 'u32 probe_timestamp' changed
|
||||
offset changed by -32
|
||||
member 'u32 icsk_probes_tstamp' was added
|
||||
|
||||
type 'struct usbnet' changed
|
||||
member changed from 'union { struct { u32 rx_speed; u32 tx_speed; }; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide213; union { }; }' to 'union { struct { u32 rx_speed; u32 tx_speed; }; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
type changed from 'union { struct { u32 rx_speed; u32 tx_speed; }; struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide213; union { }; }' to 'union { struct { u32 rx_speed; u32 tx_speed; }; struct { u64 android_kabi_reserved1; }; union { }; }'
|
||||
member 'struct { u64 android_kabi_reserved1; } __UNIQUE_ID_android_kabi_hide213' was removed
|
||||
member 'struct { u64 android_kabi_reserved1; }' was added
|
||||
|
||||
type 'struct sock' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { spinlock_t sk_peer_lock; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct fib_rules_ops' changed
|
||||
member changed from 'bool(* suppress)(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(* suppress)(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
type changed from 'bool(*)(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(*)(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
pointed-to type changed from 'bool(struct fib_rule*, struct fib_lookup_arg*)' to 'bool(struct fib_rule*, int, struct fib_lookup_arg*)'
|
||||
parameter 2 type changed from 'struct fib_lookup_arg*' to 'int'
|
||||
parameter 3 of type 'struct fib_lookup_arg*' was added
|
||||
|
||||
type 'struct snd_pcm_runtime' changed
|
||||
byte size changed from 760 to 800
|
||||
member 'struct mutex buffer_mutex' was added
|
||||
member 'atomic_t buffer_accessing' was added
|
||||
|
||||
type 'struct snd_pcm_runtime' changed
|
||||
byte size changed from 792 to 800
|
||||
member 'atomic_t buffer_accessing' was added
|
||||
|
||||
function symbol changed from 'int hex_to_bin(char)' to 'int hex_to_bin(unsigned char)'
|
||||
type changed from 'int(char)' to 'int(unsigned char)'
|
||||
parameter 1 type changed from 'char' to 'unsigned char'
|
||||
|
||||
type 'struct tcp_sock' changed
|
||||
member 'u8 unused' was removed
|
||||
member 'u8 fastopen_client_fail' was added
|
||||
member 'u32 max_packets_seq' was removed
|
||||
member 'u32 cwnd_usage_seq' was added
|
||||
|
||||
type 'struct sk_buff' changed
|
||||
member 'u64 android_kabi_reserved1' was removed
|
||||
member 'union { struct { __u8 scm_io_uring; __u8 android_kabi_reserved1_padding1; __u16 android_kabi_reserved1_padding2; __u32 android_kabi_reserved1_padding3; }; struct { u64 android_kabi_reserved1; }; union { }; }' was added
|
||||
|
||||
type 'struct anon_vma' changed
|
||||
byte size changed from 88 to 104
|
||||
member 'unsigned long int num_children' was added
|
||||
member 'unsigned long int num_active_vmas' was added
|
||||
|
||||
function symbol changed from 'struct irq_domain* __irq_domain_add(struct fwnode_handle*, int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)' to 'struct irq_domain* __irq_domain_add(struct fwnode_handle*, unsigned int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)'
|
||||
type changed from 'struct irq_domain*(struct fwnode_handle*, int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)' to 'struct irq_domain*(struct fwnode_handle*, unsigned int, irq_hw_number_t, int, const struct irq_domain_ops*, void*)'
|
||||
parameter 2 type changed from 'int' to 'unsigned int'
|
||||
|
||||
type 'struct perf_event' changed
|
||||
member 'unsigned int group_generation' was added
|
||||
|
||||
type 'struct usb_role_switch' changed
|
||||
member 'bool registered' was added
|
||||
|
||||
type 'struct tcp_sock' changed
|
||||
member 'u8 unused' was removed
|
||||
member 'u8 fastopen_client_fail' was added
|
||||
|
||||
|
|
@ -317,6 +317,7 @@ CONFIG_SERIAL_8250=y
|
|||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
# CONFIG_SERIAL_8250_EXAR is not set
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
struct task_struct;
|
||||
|
||||
register struct task_struct *riscv_current_is_tp __asm__("tp");
|
||||
|
||||
/*
|
||||
* This only works because "struct thread_info" is at offset 0 from "struct
|
||||
* task_struct". This constraint seems to be necessary on other architectures
|
||||
|
|
@ -26,8 +28,7 @@ struct task_struct;
|
|||
*/
|
||||
static __always_inline struct task_struct *get_current(void)
|
||||
{
|
||||
register struct task_struct *tp __asm__("tp");
|
||||
return tp;
|
||||
return riscv_current_is_tp;
|
||||
}
|
||||
|
||||
#define current get_current()
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
#include <asm/switch_to.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
unsigned long gp_in_global __asm__("gp");
|
||||
|
||||
extern asmlinkage void ret_from_fork(void);
|
||||
extern asmlinkage void ret_from_kernel_thread(void);
|
||||
|
||||
|
|
@ -109,9 +111,8 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long usp,
|
|||
/* p->thread holds context to be restored by __switch_to() */
|
||||
if (unlikely(p->flags & PF_KTHREAD)) {
|
||||
/* Kernel thread */
|
||||
const register unsigned long gp __asm__ ("gp");
|
||||
memset(childregs, 0, sizeof(struct pt_regs));
|
||||
childregs->gp = gp;
|
||||
childregs->gp = gp_in_global;
|
||||
childregs->sstatus = SR_SPP | SR_SPIE; /* Supervisor, irqs on */
|
||||
|
||||
p->thread.ra = (unsigned long)ret_from_kernel_thread;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include <linux/stacktrace.h>
|
||||
#include <linux/ftrace.h>
|
||||
|
||||
register unsigned long sp_in_global __asm__("sp");
|
||||
|
||||
#ifdef CONFIG_FRAME_POINTER
|
||||
|
||||
struct stackframe {
|
||||
|
|
@ -29,7 +31,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
|
|||
sp = user_stack_pointer(regs);
|
||||
pc = instruction_pointer(regs);
|
||||
} else if (task == NULL || task == current) {
|
||||
const register unsigned long current_sp __asm__ ("sp");
|
||||
const register unsigned long current_sp = sp_in_global;
|
||||
fp = (unsigned long)__builtin_frame_address(0);
|
||||
sp = current_sp;
|
||||
pc = (unsigned long)walk_stackframe;
|
||||
|
|
@ -73,8 +75,7 @@ void notrace walk_stackframe(struct task_struct *task,
|
|||
sp = user_stack_pointer(regs);
|
||||
pc = instruction_pointer(regs);
|
||||
} else if (task == NULL || task == current) {
|
||||
const register unsigned long current_sp __asm__ ("sp");
|
||||
sp = current_sp;
|
||||
sp = sp_in_global;
|
||||
pc = (unsigned long)walk_stackframe;
|
||||
} else {
|
||||
/* task blocked in __switch_to */
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ CONFIG_SERIAL_8250=y
|
|||
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
|
|
|
|||
|
|
@ -87,126 +87,84 @@
|
|||
* don't give an lvalue though). */
|
||||
extern void __bad_percpu_size(void);
|
||||
|
||||
#define percpu_to_op(qual, op, var, val) \
|
||||
do { \
|
||||
typedef typeof(var) pto_T__; \
|
||||
if (0) { \
|
||||
pto_T__ pto_tmp__; \
|
||||
pto_tmp__ = (val); \
|
||||
(void)pto_tmp__; \
|
||||
} \
|
||||
switch (sizeof(var)) { \
|
||||
case 1: \
|
||||
asm qual (op "b %1,"__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "qi" ((pto_T__)(val))); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm qual (op "w %1,"__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "ri" ((pto_T__)(val))); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm qual (op "l %1,"__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "ri" ((pto_T__)(val))); \
|
||||
break; \
|
||||
case 8: \
|
||||
asm qual (op "q %1,"__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "re" ((pto_T__)(val))); \
|
||||
break; \
|
||||
default: __bad_percpu_size(); \
|
||||
} \
|
||||
#define __pcpu_type_1 u8
|
||||
#define __pcpu_type_2 u16
|
||||
#define __pcpu_type_4 u32
|
||||
#define __pcpu_type_8 u64
|
||||
|
||||
#define __pcpu_cast_1(val) ((u8)(((unsigned long) val) & 0xff))
|
||||
#define __pcpu_cast_2(val) ((u16)(((unsigned long) val) & 0xffff))
|
||||
#define __pcpu_cast_4(val) ((u32)(((unsigned long) val) & 0xffffffff))
|
||||
#define __pcpu_cast_8(val) ((u64)(val))
|
||||
|
||||
#define __pcpu_op1_1(op, dst) op "b " dst
|
||||
#define __pcpu_op1_2(op, dst) op "w " dst
|
||||
#define __pcpu_op1_4(op, dst) op "l " dst
|
||||
#define __pcpu_op1_8(op, dst) op "q " dst
|
||||
|
||||
#define __pcpu_op2_1(op, src, dst) op "b " src ", " dst
|
||||
#define __pcpu_op2_2(op, src, dst) op "w " src ", " dst
|
||||
#define __pcpu_op2_4(op, src, dst) op "l " src ", " dst
|
||||
#define __pcpu_op2_8(op, src, dst) op "q " src ", " dst
|
||||
|
||||
#define __pcpu_reg_1(mod, x) mod "q" (x)
|
||||
#define __pcpu_reg_2(mod, x) mod "r" (x)
|
||||
#define __pcpu_reg_4(mod, x) mod "r" (x)
|
||||
#define __pcpu_reg_8(mod, x) mod "r" (x)
|
||||
|
||||
#define __pcpu_reg_imm_1(x) "qi" (x)
|
||||
#define __pcpu_reg_imm_2(x) "ri" (x)
|
||||
#define __pcpu_reg_imm_4(x) "ri" (x)
|
||||
#define __pcpu_reg_imm_8(x) "re" (x)
|
||||
|
||||
#define percpu_to_op(size, qual, op, _var, _val) \
|
||||
do { \
|
||||
__pcpu_type_##size pto_val__ = __pcpu_cast_##size(_val); \
|
||||
if (0) { \
|
||||
typeof(_var) pto_tmp__; \
|
||||
pto_tmp__ = (_val); \
|
||||
(void)pto_tmp__; \
|
||||
} \
|
||||
asm qual(__pcpu_op2_##size(op, "%[val]", __percpu_arg([var])) \
|
||||
: [var] "+m" (_var) \
|
||||
: [val] __pcpu_reg_imm_##size(pto_val__)); \
|
||||
} while (0)
|
||||
|
||||
#define percpu_unary_op(size, qual, op, _var) \
|
||||
({ \
|
||||
asm qual (__pcpu_op1_##size(op, __percpu_arg([var])) \
|
||||
: [var] "+m" (_var)); \
|
||||
})
|
||||
|
||||
/*
|
||||
* Generate a percpu add to memory instruction and optimize code
|
||||
* if one is added or subtracted.
|
||||
*/
|
||||
#define percpu_add_op(qual, var, val) \
|
||||
#define percpu_add_op(size, qual, var, val) \
|
||||
do { \
|
||||
typedef typeof(var) pao_T__; \
|
||||
const int pao_ID__ = (__builtin_constant_p(val) && \
|
||||
((val) == 1 || (val) == -1)) ? \
|
||||
(int)(val) : 0; \
|
||||
if (0) { \
|
||||
pao_T__ pao_tmp__; \
|
||||
typeof(var) pao_tmp__; \
|
||||
pao_tmp__ = (val); \
|
||||
(void)pao_tmp__; \
|
||||
} \
|
||||
switch (sizeof(var)) { \
|
||||
case 1: \
|
||||
if (pao_ID__ == 1) \
|
||||
asm qual ("incb "__percpu_arg(0) : "+m" (var)); \
|
||||
else if (pao_ID__ == -1) \
|
||||
asm qual ("decb "__percpu_arg(0) : "+m" (var)); \
|
||||
else \
|
||||
asm qual ("addb %1, "__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "qi" ((pao_T__)(val))); \
|
||||
break; \
|
||||
case 2: \
|
||||
if (pao_ID__ == 1) \
|
||||
asm qual ("incw "__percpu_arg(0) : "+m" (var)); \
|
||||
else if (pao_ID__ == -1) \
|
||||
asm qual ("decw "__percpu_arg(0) : "+m" (var)); \
|
||||
else \
|
||||
asm qual ("addw %1, "__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "ri" ((pao_T__)(val))); \
|
||||
break; \
|
||||
case 4: \
|
||||
if (pao_ID__ == 1) \
|
||||
asm qual ("incl "__percpu_arg(0) : "+m" (var)); \
|
||||
else if (pao_ID__ == -1) \
|
||||
asm qual ("decl "__percpu_arg(0) : "+m" (var)); \
|
||||
else \
|
||||
asm qual ("addl %1, "__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "ri" ((pao_T__)(val))); \
|
||||
break; \
|
||||
case 8: \
|
||||
if (pao_ID__ == 1) \
|
||||
asm qual ("incq "__percpu_arg(0) : "+m" (var)); \
|
||||
else if (pao_ID__ == -1) \
|
||||
asm qual ("decq "__percpu_arg(0) : "+m" (var)); \
|
||||
else \
|
||||
asm qual ("addq %1, "__percpu_arg(0) \
|
||||
: "+m" (var) \
|
||||
: "re" ((pao_T__)(val))); \
|
||||
break; \
|
||||
default: __bad_percpu_size(); \
|
||||
} \
|
||||
if (pao_ID__ == 1) \
|
||||
percpu_unary_op(size, qual, "inc", var); \
|
||||
else if (pao_ID__ == -1) \
|
||||
percpu_unary_op(size, qual, "dec", var); \
|
||||
else \
|
||||
percpu_to_op(size, qual, "add", var, val); \
|
||||
} while (0)
|
||||
|
||||
#define percpu_from_op(qual, op, var) \
|
||||
({ \
|
||||
typeof(var) pfo_ret__; \
|
||||
switch (sizeof(var)) { \
|
||||
case 1: \
|
||||
asm qual (op "b "__percpu_arg(1)",%0" \
|
||||
: "=q" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm qual (op "w "__percpu_arg(1)",%0" \
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm qual (op "l "__percpu_arg(1)",%0" \
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 8: \
|
||||
asm qual (op "q "__percpu_arg(1)",%0" \
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
default: __bad_percpu_size(); \
|
||||
} \
|
||||
pfo_ret__; \
|
||||
#define percpu_from_op(size, qual, op, _var) \
|
||||
({ \
|
||||
__pcpu_type_##size pfo_val__; \
|
||||
asm qual (__pcpu_op2_##size(op, __percpu_arg([var]), "%[val]") \
|
||||
: [val] __pcpu_reg_##size("=", pfo_val__) \
|
||||
: [var] "m" (_var)); \
|
||||
(typeof(_var))(unsigned long) pfo_val__; \
|
||||
})
|
||||
|
||||
#define percpu_stable_op(op, var) \
|
||||
|
|
@ -238,29 +196,6 @@ do { \
|
|||
pfo_ret__; \
|
||||
})
|
||||
|
||||
#define percpu_unary_op(qual, op, var) \
|
||||
({ \
|
||||
switch (sizeof(var)) { \
|
||||
case 1: \
|
||||
asm qual (op "b "__percpu_arg(0) \
|
||||
: "+m" (var)); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm qual (op "w "__percpu_arg(0) \
|
||||
: "+m" (var)); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm qual (op "l "__percpu_arg(0) \
|
||||
: "+m" (var)); \
|
||||
break; \
|
||||
case 8: \
|
||||
asm qual (op "q "__percpu_arg(0) \
|
||||
: "+m" (var)); \
|
||||
break; \
|
||||
default: __bad_percpu_size(); \
|
||||
} \
|
||||
})
|
||||
|
||||
/*
|
||||
* Add return operation
|
||||
*/
|
||||
|
|
@ -391,22 +326,22 @@ do { \
|
|||
*/
|
||||
#define this_cpu_read_stable(var) percpu_stable_op("mov", var)
|
||||
|
||||
#define raw_cpu_read_1(pcp) percpu_from_op(, "mov", pcp)
|
||||
#define raw_cpu_read_2(pcp) percpu_from_op(, "mov", pcp)
|
||||
#define raw_cpu_read_4(pcp) percpu_from_op(, "mov", pcp)
|
||||
#define raw_cpu_read_1(pcp) percpu_from_op(1, , "mov", pcp)
|
||||
#define raw_cpu_read_2(pcp) percpu_from_op(2, , "mov", pcp)
|
||||
#define raw_cpu_read_4(pcp) percpu_from_op(4, , "mov", pcp)
|
||||
|
||||
#define raw_cpu_write_1(pcp, val) percpu_to_op(, "mov", (pcp), val)
|
||||
#define raw_cpu_write_2(pcp, val) percpu_to_op(, "mov", (pcp), val)
|
||||
#define raw_cpu_write_4(pcp, val) percpu_to_op(, "mov", (pcp), val)
|
||||
#define raw_cpu_add_1(pcp, val) percpu_add_op(, (pcp), val)
|
||||
#define raw_cpu_add_2(pcp, val) percpu_add_op(, (pcp), val)
|
||||
#define raw_cpu_add_4(pcp, val) percpu_add_op(, (pcp), val)
|
||||
#define raw_cpu_and_1(pcp, val) percpu_to_op(, "and", (pcp), val)
|
||||
#define raw_cpu_and_2(pcp, val) percpu_to_op(, "and", (pcp), val)
|
||||
#define raw_cpu_and_4(pcp, val) percpu_to_op(, "and", (pcp), val)
|
||||
#define raw_cpu_or_1(pcp, val) percpu_to_op(, "or", (pcp), val)
|
||||
#define raw_cpu_or_2(pcp, val) percpu_to_op(, "or", (pcp), val)
|
||||
#define raw_cpu_or_4(pcp, val) percpu_to_op(, "or", (pcp), val)
|
||||
#define raw_cpu_write_1(pcp, val) percpu_to_op(1, , "mov", (pcp), val)
|
||||
#define raw_cpu_write_2(pcp, val) percpu_to_op(2, , "mov", (pcp), val)
|
||||
#define raw_cpu_write_4(pcp, val) percpu_to_op(4, , "mov", (pcp), val)
|
||||
#define raw_cpu_add_1(pcp, val) percpu_add_op(1, , (pcp), val)
|
||||
#define raw_cpu_add_2(pcp, val) percpu_add_op(2, , (pcp), val)
|
||||
#define raw_cpu_add_4(pcp, val) percpu_add_op(4, , (pcp), val)
|
||||
#define raw_cpu_and_1(pcp, val) percpu_to_op(1, , "and", (pcp), val)
|
||||
#define raw_cpu_and_2(pcp, val) percpu_to_op(2, , "and", (pcp), val)
|
||||
#define raw_cpu_and_4(pcp, val) percpu_to_op(4, , "and", (pcp), val)
|
||||
#define raw_cpu_or_1(pcp, val) percpu_to_op(1, , "or", (pcp), val)
|
||||
#define raw_cpu_or_2(pcp, val) percpu_to_op(2, , "or", (pcp), val)
|
||||
#define raw_cpu_or_4(pcp, val) percpu_to_op(4, , "or", (pcp), val)
|
||||
|
||||
/*
|
||||
* raw_cpu_xchg() can use a load-store since it is not required to be
|
||||
|
|
@ -423,21 +358,21 @@ do { \
|
|||
#define raw_cpu_xchg_2(pcp, val) raw_percpu_xchg_op(pcp, val)
|
||||
#define raw_cpu_xchg_4(pcp, val) raw_percpu_xchg_op(pcp, val)
|
||||
|
||||
#define this_cpu_read_1(pcp) percpu_from_op(volatile, "mov", pcp)
|
||||
#define this_cpu_read_2(pcp) percpu_from_op(volatile, "mov", pcp)
|
||||
#define this_cpu_read_4(pcp) percpu_from_op(volatile, "mov", pcp)
|
||||
#define this_cpu_write_1(pcp, val) percpu_to_op(volatile, "mov", (pcp), val)
|
||||
#define this_cpu_write_2(pcp, val) percpu_to_op(volatile, "mov", (pcp), val)
|
||||
#define this_cpu_write_4(pcp, val) percpu_to_op(volatile, "mov", (pcp), val)
|
||||
#define this_cpu_add_1(pcp, val) percpu_add_op(volatile, (pcp), val)
|
||||
#define this_cpu_add_2(pcp, val) percpu_add_op(volatile, (pcp), val)
|
||||
#define this_cpu_add_4(pcp, val) percpu_add_op(volatile, (pcp), val)
|
||||
#define this_cpu_and_1(pcp, val) percpu_to_op(volatile, "and", (pcp), val)
|
||||
#define this_cpu_and_2(pcp, val) percpu_to_op(volatile, "and", (pcp), val)
|
||||
#define this_cpu_and_4(pcp, val) percpu_to_op(volatile, "and", (pcp), val)
|
||||
#define this_cpu_or_1(pcp, val) percpu_to_op(volatile, "or", (pcp), val)
|
||||
#define this_cpu_or_2(pcp, val) percpu_to_op(volatile, "or", (pcp), val)
|
||||
#define this_cpu_or_4(pcp, val) percpu_to_op(volatile, "or", (pcp), val)
|
||||
#define this_cpu_read_1(pcp) percpu_from_op(1, volatile, "mov", pcp)
|
||||
#define this_cpu_read_2(pcp) percpu_from_op(2, volatile, "mov", pcp)
|
||||
#define this_cpu_read_4(pcp) percpu_from_op(4, volatile, "mov", pcp)
|
||||
#define this_cpu_write_1(pcp, val) percpu_to_op(1, volatile, "mov", (pcp), val)
|
||||
#define this_cpu_write_2(pcp, val) percpu_to_op(2, volatile, "mov", (pcp), val)
|
||||
#define this_cpu_write_4(pcp, val) percpu_to_op(4, volatile, "mov", (pcp), val)
|
||||
#define this_cpu_add_1(pcp, val) percpu_add_op(1, volatile, (pcp), val)
|
||||
#define this_cpu_add_2(pcp, val) percpu_add_op(2, volatile, (pcp), val)
|
||||
#define this_cpu_add_4(pcp, val) percpu_add_op(4, volatile, (pcp), val)
|
||||
#define this_cpu_and_1(pcp, val) percpu_to_op(1, volatile, "and", (pcp), val)
|
||||
#define this_cpu_and_2(pcp, val) percpu_to_op(2, volatile, "and", (pcp), val)
|
||||
#define this_cpu_and_4(pcp, val) percpu_to_op(4, volatile, "and", (pcp), val)
|
||||
#define this_cpu_or_1(pcp, val) percpu_to_op(1, volatile, "or", (pcp), val)
|
||||
#define this_cpu_or_2(pcp, val) percpu_to_op(2, volatile, "or", (pcp), val)
|
||||
#define this_cpu_or_4(pcp, val) percpu_to_op(4, volatile, "or", (pcp), val)
|
||||
#define this_cpu_xchg_1(pcp, nval) percpu_xchg_op(volatile, pcp, nval)
|
||||
#define this_cpu_xchg_2(pcp, nval) percpu_xchg_op(volatile, pcp, nval)
|
||||
#define this_cpu_xchg_4(pcp, nval) percpu_xchg_op(volatile, pcp, nval)
|
||||
|
|
@ -478,20 +413,20 @@ do { \
|
|||
* 32 bit must fall back to generic operations.
|
||||
*/
|
||||
#ifdef CONFIG_X86_64
|
||||
#define raw_cpu_read_8(pcp) percpu_from_op(, "mov", pcp)
|
||||
#define raw_cpu_write_8(pcp, val) percpu_to_op(, "mov", (pcp), val)
|
||||
#define raw_cpu_add_8(pcp, val) percpu_add_op(, (pcp), val)
|
||||
#define raw_cpu_and_8(pcp, val) percpu_to_op(, "and", (pcp), val)
|
||||
#define raw_cpu_or_8(pcp, val) percpu_to_op(, "or", (pcp), val)
|
||||
#define raw_cpu_read_8(pcp) percpu_from_op(8, , "mov", pcp)
|
||||
#define raw_cpu_write_8(pcp, val) percpu_to_op(8, , "mov", (pcp), val)
|
||||
#define raw_cpu_add_8(pcp, val) percpu_add_op(8, , (pcp), val)
|
||||
#define raw_cpu_and_8(pcp, val) percpu_to_op(8, , "and", (pcp), val)
|
||||
#define raw_cpu_or_8(pcp, val) percpu_to_op(8, , "or", (pcp), val)
|
||||
#define raw_cpu_add_return_8(pcp, val) percpu_add_return_op(, pcp, val)
|
||||
#define raw_cpu_xchg_8(pcp, nval) raw_percpu_xchg_op(pcp, nval)
|
||||
#define raw_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(, pcp, oval, nval)
|
||||
|
||||
#define this_cpu_read_8(pcp) percpu_from_op(volatile, "mov", pcp)
|
||||
#define this_cpu_write_8(pcp, val) percpu_to_op(volatile, "mov", (pcp), val)
|
||||
#define this_cpu_add_8(pcp, val) percpu_add_op(volatile, (pcp), val)
|
||||
#define this_cpu_and_8(pcp, val) percpu_to_op(volatile, "and", (pcp), val)
|
||||
#define this_cpu_or_8(pcp, val) percpu_to_op(volatile, "or", (pcp), val)
|
||||
#define this_cpu_read_8(pcp) percpu_from_op(8, volatile, "mov", pcp)
|
||||
#define this_cpu_write_8(pcp, val) percpu_to_op(8, volatile, "mov", (pcp), val)
|
||||
#define this_cpu_add_8(pcp, val) percpu_add_op(8, volatile, (pcp), val)
|
||||
#define this_cpu_and_8(pcp, val) percpu_to_op(8, volatile, "and", (pcp), val)
|
||||
#define this_cpu_or_8(pcp, val) percpu_to_op(8, volatile, "or", (pcp), val)
|
||||
#define this_cpu_add_return_8(pcp, val) percpu_add_return_op(volatile, pcp, val)
|
||||
#define this_cpu_xchg_8(pcp, nval) percpu_xchg_op(volatile, pcp, nval)
|
||||
#define this_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(volatile, pcp, oval, nval)
|
||||
|
|
|
|||
|
|
@ -1294,6 +1294,10 @@ static void binder_cleanup_ref_olocked(struct binder_ref *ref)
|
|||
binder_dequeue_work(ref->proc, &ref->death->work);
|
||||
binder_stats_deleted(BINDER_STAT_DEATH);
|
||||
}
|
||||
|
||||
if (ref->freeze)
|
||||
binder_dequeue_work(ref->proc, &ref->freeze->work);
|
||||
|
||||
binder_stats_deleted(BINDER_STAT_REF);
|
||||
}
|
||||
|
||||
|
|
@ -3806,7 +3810,6 @@ binder_request_freeze_notification(struct binder_proc *proc,
|
|||
{
|
||||
struct binder_ref_freeze *freeze;
|
||||
struct binder_ref *ref;
|
||||
bool is_frozen;
|
||||
|
||||
freeze = kzalloc(sizeof(*freeze), GFP_KERNEL);
|
||||
if (!freeze)
|
||||
|
|
@ -3822,31 +3825,30 @@ binder_request_freeze_notification(struct binder_proc *proc,
|
|||
}
|
||||
|
||||
binder_node_lock(ref->node);
|
||||
|
||||
if (ref->freeze || !ref->node->proc) {
|
||||
binder_user_error("%d:%d invalid BC_REQUEST_FREEZE_NOTIFICATION %s\n",
|
||||
proc->pid, thread->pid,
|
||||
ref->freeze ? "already set" : "dead node");
|
||||
if (ref->freeze) {
|
||||
binder_user_error("%d:%d BC_REQUEST_FREEZE_NOTIFICATION already set\n",
|
||||
proc->pid, thread->pid);
|
||||
binder_node_unlock(ref->node);
|
||||
binder_proc_unlock(proc);
|
||||
kfree(freeze);
|
||||
return -EINVAL;
|
||||
}
|
||||
binder_inner_proc_lock(ref->node->proc);
|
||||
is_frozen = ref->node->proc->is_frozen;
|
||||
binder_inner_proc_unlock(ref->node->proc);
|
||||
|
||||
INIT_LIST_HEAD(&freeze->work.entry);
|
||||
freeze->cookie = handle_cookie->cookie;
|
||||
freeze->work.type = BINDER_WORK_FROZEN_BINDER;
|
||||
freeze->is_frozen = is_frozen;
|
||||
|
||||
ref->freeze = freeze;
|
||||
|
||||
binder_inner_proc_lock(proc);
|
||||
binder_enqueue_work_ilocked(&ref->freeze->work, &proc->todo);
|
||||
binder_wakeup_proc_ilocked(proc);
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (ref->node->proc) {
|
||||
binder_inner_proc_lock(ref->node->proc);
|
||||
freeze->is_frozen = ref->node->proc->is_frozen;
|
||||
binder_inner_proc_unlock(ref->node->proc);
|
||||
|
||||
binder_inner_proc_lock(proc);
|
||||
binder_enqueue_work_ilocked(&freeze->work, &proc->todo);
|
||||
binder_wakeup_proc_ilocked(proc);
|
||||
binder_inner_proc_unlock(proc);
|
||||
}
|
||||
|
||||
binder_node_unlock(ref->node);
|
||||
binder_proc_unlock(proc);
|
||||
|
|
@ -5101,6 +5103,15 @@ static void binder_release_work(struct binder_proc *proc,
|
|||
} break;
|
||||
case BINDER_WORK_NODE:
|
||||
break;
|
||||
case BINDER_WORK_CLEAR_FREEZE_NOTIFICATION: {
|
||||
struct binder_ref_freeze *freeze;
|
||||
|
||||
freeze = container_of(w, struct binder_ref_freeze, work);
|
||||
binder_debug(BINDER_DEBUG_DEAD_TRANSACTION,
|
||||
"undelivered freeze notification, %016llx\n",
|
||||
(u64)freeze->cookie);
|
||||
kfree(freeze);
|
||||
} break;
|
||||
default:
|
||||
pr_err("unexpected work type, %d, not freed\n",
|
||||
wtype);
|
||||
|
|
@ -5513,6 +5524,7 @@ static bool binder_txns_pending_ilocked(struct binder_proc *proc)
|
|||
|
||||
static void binder_add_freeze_work(struct binder_proc *proc, bool is_frozen)
|
||||
{
|
||||
struct binder_node *prev = NULL;
|
||||
struct rb_node *n;
|
||||
struct binder_ref *ref;
|
||||
|
||||
|
|
@ -5521,7 +5533,10 @@ static void binder_add_freeze_work(struct binder_proc *proc, bool is_frozen)
|
|||
struct binder_node *node;
|
||||
|
||||
node = rb_entry(n, struct binder_node, rb_node);
|
||||
binder_inc_node_tmpref_ilocked(node);
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (prev)
|
||||
binder_put_node(prev);
|
||||
binder_node_lock(node);
|
||||
hlist_for_each_entry(ref, &node->refs, node_entry) {
|
||||
/*
|
||||
|
|
@ -5547,10 +5562,15 @@ static void binder_add_freeze_work(struct binder_proc *proc, bool is_frozen)
|
|||
}
|
||||
binder_inner_proc_unlock(ref->proc);
|
||||
}
|
||||
prev = node;
|
||||
binder_node_unlock(node);
|
||||
binder_inner_proc_lock(proc);
|
||||
if (proc->is_dead)
|
||||
break;
|
||||
}
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (prev)
|
||||
binder_put_node(prev);
|
||||
}
|
||||
|
||||
static int binder_ioctl_freeze(struct binder_freeze_info *info,
|
||||
|
|
@ -6223,6 +6243,7 @@ static void binder_deferred_release(struct binder_proc *proc)
|
|||
|
||||
binder_release_work(proc, &proc->todo);
|
||||
binder_release_work(proc, &proc->delivered_death);
|
||||
binder_release_work(proc, &proc_wrapper(proc)->delivered_freeze);
|
||||
|
||||
binder_debug(BINDER_DEBUG_OPEN_CLOSE,
|
||||
"%s: %d threads %d, nodes %d (ref %d), refs %d, active transactions %d\n",
|
||||
|
|
@ -6355,6 +6376,12 @@ static void print_binder_work_ilocked(struct seq_file *m,
|
|||
case BINDER_WORK_CLEAR_DEATH_NOTIFICATION:
|
||||
seq_printf(m, "%shas cleared death notification\n", prefix);
|
||||
break;
|
||||
case BINDER_WORK_FROZEN_BINDER:
|
||||
seq_printf(m, "%shas frozen binder\n", prefix);
|
||||
break;
|
||||
case BINDER_WORK_CLEAR_FREEZE_NOTIFICATION:
|
||||
seq_printf(m, "%shas cleared freeze notification\n", prefix);
|
||||
break;
|
||||
default:
|
||||
seq_printf(m, "%sunknown work: type %d\n", prefix, w->type);
|
||||
break;
|
||||
|
|
@ -6504,6 +6531,10 @@ static void print_binder_proc(struct seq_file *m,
|
|||
seq_puts(m, " has delivered dead binder\n");
|
||||
break;
|
||||
}
|
||||
list_for_each_entry(w, &proc_wrapper(proc)->delivered_freeze, entry) {
|
||||
seq_puts(m, " has delivered freeze binder\n");
|
||||
break;
|
||||
}
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (!print_all && m->count == header_pos)
|
||||
m->count = start_pos;
|
||||
|
|
|
|||
|
|
@ -2230,6 +2230,75 @@ static void nfdicf_init(void)
|
|||
file_fail(fold_name);
|
||||
}
|
||||
|
||||
static void ignore_init(void)
|
||||
{
|
||||
FILE *file;
|
||||
unsigned int unichar;
|
||||
unsigned int first;
|
||||
unsigned int last;
|
||||
unsigned int *um;
|
||||
int count;
|
||||
int ret;
|
||||
|
||||
if (verbose > 0)
|
||||
printf("Parsing %s\n", prop_name);
|
||||
file = fopen(prop_name, "r");
|
||||
if (!file)
|
||||
open_fail(prop_name, errno);
|
||||
assert(file);
|
||||
count = 0;
|
||||
while (fgets(line, LINESIZE, file)) {
|
||||
ret = sscanf(line, "%X..%X ; %s # ", &first, &last, buf0);
|
||||
if (ret == 3) {
|
||||
if (strcmp(buf0, "Default_Ignorable_Code_Point"))
|
||||
continue;
|
||||
if (!utf32valid(first) || !utf32valid(last))
|
||||
line_fail(prop_name, line);
|
||||
for (unichar = first; unichar <= last; unichar++) {
|
||||
free(unicode_data[unichar].utf32nfdi);
|
||||
um = malloc(sizeof(unsigned int));
|
||||
*um = 0;
|
||||
unicode_data[unichar].utf32nfdi = um;
|
||||
free(unicode_data[unichar].utf32nfdicf);
|
||||
um = malloc(sizeof(unsigned int));
|
||||
*um = 0;
|
||||
unicode_data[unichar].utf32nfdicf = um;
|
||||
count++;
|
||||
}
|
||||
if (verbose > 1)
|
||||
printf(" %X..%X Default_Ignorable_Code_Point\n",
|
||||
first, last);
|
||||
continue;
|
||||
}
|
||||
ret = sscanf(line, "%X ; %s # ", &unichar, buf0);
|
||||
if (ret == 2) {
|
||||
if (strcmp(buf0, "Default_Ignorable_Code_Point"))
|
||||
continue;
|
||||
if (!utf32valid(unichar))
|
||||
line_fail(prop_name, line);
|
||||
free(unicode_data[unichar].utf32nfdi);
|
||||
um = malloc(sizeof(unsigned int));
|
||||
*um = 0;
|
||||
unicode_data[unichar].utf32nfdi = um;
|
||||
free(unicode_data[unichar].utf32nfdicf);
|
||||
um = malloc(sizeof(unsigned int));
|
||||
*um = 0;
|
||||
unicode_data[unichar].utf32nfdicf = um;
|
||||
if (verbose > 1)
|
||||
printf(" %X Default_Ignorable_Code_Point\n",
|
||||
unichar);
|
||||
count++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
fclose(file);
|
||||
|
||||
if (verbose > 0)
|
||||
printf("Found %d entries\n", count);
|
||||
if (count == 0)
|
||||
file_fail(prop_name);
|
||||
}
|
||||
|
||||
static void corrections_init(void)
|
||||
{
|
||||
FILE *file;
|
||||
|
|
@ -3327,6 +3396,7 @@ int main(int argc, char *argv[])
|
|||
ccc_init();
|
||||
nfdi_init();
|
||||
nfdicf_init();
|
||||
ignore_init();
|
||||
corrections_init();
|
||||
hangul_decompose();
|
||||
nfdi_decompose();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue