mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
Merge branch 'android14-5.15' into branch 'android14-5.15-lts'
This catches the android14-5.15-lts branch up with recent changes maded in android14-5.15. This includes the following commits:fb512eac3cANDROID: binder: fix ptrdiff_t printk-format issue2526c59f3fANDROID: usb: Optimize the problem of slow transfer rate in USB accessory mode5981994114UPSTREAM: usb: typec: tcpm: clear pd_event queue in PORT_RESET1167a6a15cBACKPORT: usb: typec: tcpm: enforce ready state when queueing alt mode vdmab87c12aa2BACKPORT: f2fs: sysfs: support discard_io_aware1f9a0ccd86ANDROID: GKI: Update symbol list for Amlogic62000bb037ANDROID: KVM: arm64: wait_for_initramfs for pKVM module loading procfsd5eef65564BACKPORT: FROMGIT: usb: typec: tcpm: Check for port partner validity before consuming it4dd58977f2BACKPORT: FROMGIT: kbuild: Remove support for Clang's ThinLTO caching2a64b7fe17ANDROID: 16K: Fix call to show_pad_maps_fn()596b6507c3ANDROID: 16K: Fix show maps CFI failure Change-Id: Ia9a6a2614003664b62bcd28f0ab131430fb1965a Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -740,3 +740,9 @@ Description: When compress cache is on, it controls cached page
|
||||
If cached page percent exceed threshold, then deny caching compress page.
|
||||
The value should be in range of (0, 100], by default it was initialized
|
||||
as 20(%).
|
||||
|
||||
What: /sys/fs/f2fs/<disk>/discard_io_aware
|
||||
Date: November 2023
|
||||
Contact: "Chao Yu" <chao@kernel.org>
|
||||
Description: It controls to enable/disable IO aware feature for background discard.
|
||||
By default, the value is 1 which indicates IO aware is on.
|
||||
|
||||
5
Makefile
5
Makefile
@@ -983,7 +983,6 @@ endif
|
||||
ifdef CONFIG_LTO_CLANG
|
||||
ifdef CONFIG_LTO_CLANG_THIN
|
||||
CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit
|
||||
KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod_prefix).thinlto-cache
|
||||
else
|
||||
CC_FLAGS_LTO := -flto
|
||||
endif
|
||||
@@ -1605,7 +1604,7 @@ endif # CONFIG_MODULES
|
||||
# Directories & files removed with 'make clean'
|
||||
CLEAN_FILES += include/ksym vmlinux.symvers modules-only.symvers \
|
||||
modules.builtin modules.builtin.modinfo modules.nsdeps \
|
||||
compile_commands.json .thinlto-cache
|
||||
compile_commands.json
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
MRPROPER_FILES += include/config include/generated \
|
||||
@@ -1833,7 +1832,7 @@ PHONY += compile_commands.json
|
||||
|
||||
clean-dirs := $(KBUILD_EXTMOD)
|
||||
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers $(KBUILD_EXTMOD)/modules.nsdeps \
|
||||
$(KBUILD_EXTMOD)/compile_commands.json $(KBUILD_EXTMOD)/.thinlto-cache
|
||||
$(KBUILD_EXTMOD)/compile_commands.json
|
||||
|
||||
PHONY += prepare
|
||||
# now expand this into a simple variable to reduce the cost of shell evaluations
|
||||
|
||||
@@ -284989,6 +284989,16 @@ function {
|
||||
parameter_id: 0x6720d32f
|
||||
parameter_id: 0x06f29f19
|
||||
}
|
||||
function {
|
||||
id: 0x95a4c6b8
|
||||
return_type_id: 0x6720d32f
|
||||
parameter_id: 0x26e55184
|
||||
parameter_id: 0x6720d32f
|
||||
parameter_id: 0x04ca9246
|
||||
parameter_id: 0x33756485
|
||||
parameter_id: 0x33756485
|
||||
parameter_id: 0x4585663f
|
||||
}
|
||||
function {
|
||||
id: 0x95a4d158
|
||||
return_type_id: 0x6720d32f
|
||||
@@ -355942,6 +355952,15 @@ elf_symbol {
|
||||
type_id: 0x33756485
|
||||
full_name: "thermal_pressure"
|
||||
}
|
||||
elf_symbol {
|
||||
id: 0x91df6de8
|
||||
name: "thermal_zone_bind_cooling_device"
|
||||
is_defined: true
|
||||
symbol_type: FUNCTION
|
||||
crc: 0xb6d226d0
|
||||
type_id: 0x95a4c6b8
|
||||
full_name: "thermal_zone_bind_cooling_device"
|
||||
}
|
||||
elf_symbol {
|
||||
id: 0x96242237
|
||||
name: "thermal_zone_device_disable"
|
||||
@@ -369592,6 +369611,7 @@ interface {
|
||||
symbol_id: 0x2d1f2cdd
|
||||
symbol_id: 0xdfc3c1f5
|
||||
symbol_id: 0x8c0c76a2
|
||||
symbol_id: 0x91df6de8
|
||||
symbol_id: 0x96242237
|
||||
symbol_id: 0x571b278c
|
||||
symbol_id: 0x3272fe14
|
||||
|
||||
@@ -295,6 +295,7 @@
|
||||
del_timer
|
||||
del_timer_sync
|
||||
dentry_path_raw
|
||||
desc_to_gpio
|
||||
des_expand_key
|
||||
destroy_workqueue
|
||||
dev_alloc_name
|
||||
@@ -316,6 +317,7 @@
|
||||
device_create
|
||||
device_create_file
|
||||
device_create_managed_software_node
|
||||
device_create_with_groups
|
||||
device_del
|
||||
device_destroy
|
||||
device_for_each_child
|
||||
@@ -439,6 +441,7 @@
|
||||
devres_add
|
||||
__devres_alloc_node
|
||||
devres_free
|
||||
devres_release
|
||||
dev_set_name
|
||||
_dev_warn
|
||||
d_find_alias
|
||||
@@ -643,6 +646,7 @@
|
||||
drm_gem_prime_import
|
||||
drm_gem_prime_mmap
|
||||
drm_gem_vm_close
|
||||
drm_get_format_info
|
||||
drm_hdcp_update_content_protection
|
||||
drm_helper_hpd_irq_event
|
||||
drm_helper_mode_fill_fb_struct
|
||||
@@ -879,12 +883,16 @@
|
||||
gpiochip_generic_free
|
||||
gpiochip_generic_request
|
||||
gpiochip_get_data
|
||||
gpiochip_line_is_valid
|
||||
gpiochip_lock_as_irq
|
||||
gpiochip_unlock_as_irq
|
||||
gpiod_cansleep
|
||||
gpiod_count
|
||||
gpiod_direction_input
|
||||
gpiod_direction_output
|
||||
gpiod_direction_output_raw
|
||||
gpiod_get
|
||||
gpiod_get_direction
|
||||
gpiod_get_index
|
||||
gpiod_get_index_optional
|
||||
gpiod_get_optional
|
||||
@@ -1062,6 +1070,9 @@
|
||||
kernel_param_unlock
|
||||
kernel_restart
|
||||
kernel_sigaction
|
||||
kernfs_find_and_get_ns
|
||||
kernfs_notify
|
||||
kernfs_put
|
||||
kern_mount
|
||||
kern_unmount
|
||||
key_create_or_update
|
||||
@@ -1718,6 +1729,7 @@
|
||||
remove_cpu
|
||||
remove_proc_entry
|
||||
remove_wait_queue
|
||||
request_any_context_irq
|
||||
request_firmware
|
||||
request_firmware_nowait
|
||||
__request_module
|
||||
@@ -2058,10 +2070,14 @@
|
||||
task_sched_runtime
|
||||
thermal_cooling_device_unregister
|
||||
thermal_of_cooling_device_register
|
||||
thermal_zone_bind_cooling_device
|
||||
thermal_zone_device_disable
|
||||
thermal_zone_device_enable
|
||||
thermal_zone_device_unregister
|
||||
thermal_zone_device_update
|
||||
thermal_zone_get_zone_by_name
|
||||
thermal_zone_of_sensor_unregister
|
||||
thermal_zone_unbind_cooling_device
|
||||
time64_to_tm
|
||||
timespec64_to_jiffies
|
||||
_totalram_pages
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
* Author: Quentin Perret <qperret@google.com>
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/initrd.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/kmemleak.h>
|
||||
#include <linux/kvm_host.h>
|
||||
@@ -627,6 +629,7 @@ static int __init __pkvm_request_early_module(char *module_name,
|
||||
"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
|
||||
NULL
|
||||
};
|
||||
static bool proc;
|
||||
char **argv;
|
||||
int idx = 0;
|
||||
|
||||
@@ -658,6 +661,15 @@ static int __init __pkvm_request_early_module(char *module_name,
|
||||
/* Even with CONFIG_STATIC_USERMODEHELPER we really want this path */
|
||||
info->path = modprobe_path;
|
||||
|
||||
if (!proc) {
|
||||
wait_for_initramfs();
|
||||
if (init_mount("proc", "/proc", "proc",
|
||||
MS_SILENT | MS_NOEXEC | MS_NOSUID, NULL))
|
||||
pr_warn("Couldn't mount /proc, pKVM module parameters will be ignored\n");
|
||||
|
||||
proc = true;
|
||||
}
|
||||
|
||||
return call_usermodehelper_exec(info, UMH_WAIT_PROC | UMH_KILLABLE);
|
||||
err:
|
||||
kfree(argv);
|
||||
@@ -686,11 +698,7 @@ int __init pkvm_load_early_modules(void)
|
||||
{
|
||||
char *token, *buf = early_pkvm_modules;
|
||||
char *module_path = CONFIG_PKVM_MODULE_PATH;
|
||||
int err = init_mount("proc", "/proc", "proc",
|
||||
MS_SILENT | MS_NOEXEC | MS_NOSUID, NULL);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
int err;
|
||||
|
||||
while (true) {
|
||||
token = strsep(&buf, ",");
|
||||
|
||||
@@ -6216,7 +6216,7 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
|
||||
}
|
||||
if (buffer->target_node)
|
||||
seq_printf(m, " node %d", buffer->target_node->debug_id);
|
||||
seq_printf(m, " size %zd:%zd offset %lx\n",
|
||||
seq_printf(m, " size %zd:%zd offset %tx\n",
|
||||
buffer->data_size, buffer->offsets_size,
|
||||
proc->alloc.buffer - buffer->user_data);
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ void binder_alloc_print_allocated(struct seq_file *m,
|
||||
binder_alloc_lock(alloc);
|
||||
for (n = rb_first(&alloc->allocated_buffers); n; n = rb_next(n)) {
|
||||
buffer = rb_entry(n, struct binder_buffer, rb_node);
|
||||
seq_printf(m, " buffer %d: %lx size %zd:%zd:%zd %s\n",
|
||||
seq_printf(m, " buffer %d: %tx size %zd:%zd:%zd %s\n",
|
||||
buffer->debug_id,
|
||||
buffer->user_data - alloc->buffer,
|
||||
buffer->data_size, buffer->offsets_size,
|
||||
|
||||
@@ -171,7 +171,7 @@ static struct usb_ss_ep_comp_descriptor acc_superspeedplus_comp_desc = {
|
||||
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
|
||||
|
||||
/* the following 2 values can be tweaked if necessary */
|
||||
/* .bMaxBurst = 0, */
|
||||
.bMaxBurst = 6,
|
||||
/* .bmAttributes = 0, */
|
||||
};
|
||||
|
||||
@@ -196,7 +196,7 @@ static struct usb_ss_ep_comp_descriptor acc_superspeed_comp_desc = {
|
||||
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
|
||||
|
||||
/* the following 2 values can be tweaked if necessary */
|
||||
/* .bMaxBurst = 0, */
|
||||
.bMaxBurst = 6,
|
||||
/* .bmAttributes = 0, */
|
||||
};
|
||||
|
||||
|
||||
@@ -1469,6 +1469,9 @@ static void tcpm_queue_vdm(struct tcpm_port *port, const u32 header,
|
||||
static void tcpm_queue_vdm_unlocked(struct tcpm_port *port, const u32 header,
|
||||
const u32 *data, int cnt)
|
||||
{
|
||||
if (port->state != SRC_READY && port->state != SNK_READY)
|
||||
return;
|
||||
|
||||
mutex_lock(&port->lock);
|
||||
tcpm_queue_vdm(port, header, data, cnt);
|
||||
mutex_unlock(&port->lock);
|
||||
@@ -1485,7 +1488,8 @@ static void svdm_consume_identity(struct tcpm_port *port, const u32 *p, int cnt)
|
||||
port->partner_ident.cert_stat = p[VDO_INDEX_CSTAT];
|
||||
port->partner_ident.product = product;
|
||||
|
||||
typec_partner_set_identity(port->partner);
|
||||
if (port->partner)
|
||||
typec_partner_set_identity(port->partner);
|
||||
|
||||
tcpm_log(port, "Identity: %04x:%04x.%04x",
|
||||
PD_IDH_VID(vdo),
|
||||
@@ -1573,6 +1577,9 @@ static void tcpm_register_partner_altmodes(struct tcpm_port *port)
|
||||
struct typec_altmode *altmode;
|
||||
int i;
|
||||
|
||||
if (!port->partner)
|
||||
return;
|
||||
|
||||
for (i = 0; i < modep->altmodes; i++) {
|
||||
altmode = typec_partner_register_altmode(port->partner,
|
||||
&modep->altmode_desc[i]);
|
||||
@@ -3522,7 +3529,10 @@ static int tcpm_init_vconn(struct tcpm_port *port)
|
||||
|
||||
static void tcpm_typec_connect(struct tcpm_port *port)
|
||||
{
|
||||
struct typec_partner *partner;
|
||||
|
||||
if (!port->connected) {
|
||||
port->connected = true;
|
||||
/* Make sure we don't report stale identity information */
|
||||
memset(&port->partner_ident, 0, sizeof(port->partner_ident));
|
||||
port->partner_desc.usb_pd = port->pd_capable;
|
||||
@@ -3532,9 +3542,13 @@ static void tcpm_typec_connect(struct tcpm_port *port)
|
||||
port->partner_desc.accessory = TYPEC_ACCESSORY_AUDIO;
|
||||
else
|
||||
port->partner_desc.accessory = TYPEC_ACCESSORY_NONE;
|
||||
port->partner = typec_register_partner(port->typec_port,
|
||||
&port->partner_desc);
|
||||
port->connected = true;
|
||||
partner = typec_register_partner(port->typec_port, &port->partner_desc);
|
||||
if (IS_ERR(partner)) {
|
||||
dev_err(port->dev, "Failed to register partner (%ld)\n", PTR_ERR(partner));
|
||||
return;
|
||||
}
|
||||
|
||||
port->partner = partner;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3603,8 +3617,10 @@ out_disable_mux:
|
||||
static void tcpm_typec_disconnect(struct tcpm_port *port)
|
||||
{
|
||||
if (port->connected) {
|
||||
typec_unregister_partner(port->partner);
|
||||
port->partner = NULL;
|
||||
if (port->partner) {
|
||||
typec_unregister_partner(port->partner);
|
||||
port->partner = NULL;
|
||||
}
|
||||
port->connected = false;
|
||||
}
|
||||
}
|
||||
@@ -3813,6 +3829,9 @@ static enum typec_cc_status tcpm_pwr_opmode_to_rp(enum typec_pwr_opmode opmode)
|
||||
|
||||
static void tcpm_set_initial_svdm_version(struct tcpm_port *port)
|
||||
{
|
||||
if (!port->partner)
|
||||
return;
|
||||
|
||||
switch (port->negotiated_rev) {
|
||||
case PD_REV30:
|
||||
break;
|
||||
@@ -4818,6 +4837,7 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
break;
|
||||
case PORT_RESET:
|
||||
tcpm_reset_port(port);
|
||||
port->pd_events = 0;
|
||||
tcpm_set_cc(port, TYPEC_CC_OPEN);
|
||||
tcpm_set_state(port, PORT_RESET_WAIT_OFF,
|
||||
PD_T_ERROR_RECOVERY);
|
||||
|
||||
@@ -370,6 +370,12 @@ enum {
|
||||
MAX_DPOLICY,
|
||||
};
|
||||
|
||||
enum {
|
||||
DPOLICY_IO_AWARE_DISABLE, /* force to not be aware of IO */
|
||||
DPOLICY_IO_AWARE_ENABLE, /* force to be aware of IO */
|
||||
DPOLICY_IO_AWARE_MAX,
|
||||
};
|
||||
|
||||
struct discard_policy {
|
||||
int type; /* type of discard */
|
||||
unsigned int min_interval; /* used for candidates exist */
|
||||
@@ -402,6 +408,7 @@ struct discard_cmd_control {
|
||||
unsigned int discard_urgent_util; /* utilization which issue discard proactively */
|
||||
unsigned int discard_granularity; /* discard granularity */
|
||||
unsigned int max_ordered_discard; /* maximum discard granularity issued by lba order */
|
||||
unsigned int discard_io_aware; /* io_aware policy */
|
||||
unsigned int undiscard_blks; /* # of undiscard blocks */
|
||||
unsigned int next_pos; /* next discard position */
|
||||
atomic_t issued_discard; /* # of issued discard */
|
||||
|
||||
@@ -1168,7 +1168,10 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi,
|
||||
dpolicy->min_interval = dcc->min_discard_issue_time;
|
||||
dpolicy->mid_interval = dcc->mid_discard_issue_time;
|
||||
dpolicy->max_interval = dcc->max_discard_issue_time;
|
||||
dpolicy->io_aware = true;
|
||||
if (dcc->discard_io_aware == DPOLICY_IO_AWARE_ENABLE)
|
||||
dpolicy->io_aware = true;
|
||||
else if (dcc->discard_io_aware == DPOLICY_IO_AWARE_DISABLE)
|
||||
dpolicy->io_aware = false;
|
||||
dpolicy->sync = false;
|
||||
dpolicy->ordered = true;
|
||||
if (utilization(sbi) > dcc->discard_urgent_util) {
|
||||
@@ -2177,6 +2180,7 @@ static int create_discard_cmd_control(struct f2fs_sb_info *sbi)
|
||||
dcc->discard_io_aware_gran = MAX_PLIST_NUM;
|
||||
dcc->discard_granularity = DEFAULT_DISCARD_GRANULARITY;
|
||||
dcc->max_ordered_discard = DEFAULT_MAX_ORDERED_DISCARD_GRANULARITY;
|
||||
dcc->discard_io_aware = DPOLICY_IO_AWARE_ENABLE;
|
||||
if (F2FS_OPTION(sbi).discard_unit == DISCARD_UNIT_SEGMENT)
|
||||
dcc->discard_granularity = sbi->blocks_per_seg;
|
||||
else if (F2FS_OPTION(sbi).discard_unit == DISCARD_UNIT_SECTION)
|
||||
|
||||
@@ -507,6 +507,13 @@ out:
|
||||
return count;
|
||||
}
|
||||
|
||||
if (!strcmp(a->attr.name, "discard_io_aware")) {
|
||||
if (t >= DPOLICY_IO_AWARE_MAX)
|
||||
return -EINVAL;
|
||||
*ui = t;
|
||||
return count;
|
||||
}
|
||||
|
||||
if (!strcmp(a->attr.name, "migration_granularity")) {
|
||||
if (t == 0 || t > sbi->segs_per_sec)
|
||||
return -EINVAL;
|
||||
@@ -868,6 +875,7 @@ F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_io_aware_gran, discard_io_aw
|
||||
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_urgent_util, discard_urgent_util);
|
||||
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_granularity, discard_granularity);
|
||||
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, max_ordered_discard, max_ordered_discard);
|
||||
F2FS_RW_ATTR(DCC_INFO, discard_cmd_control, discard_io_aware, discard_io_aware);
|
||||
F2FS_RW_ATTR(RESERVED_BLOCKS, f2fs_sb_info, reserved_blocks, reserved_blocks);
|
||||
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, ipu_policy, ipu_policy);
|
||||
F2FS_RW_ATTR(SM_INFO, f2fs_sm_info, min_ipu_util, min_ipu_util);
|
||||
@@ -1007,6 +1015,7 @@ static struct attribute *f2fs_attrs[] = {
|
||||
ATTR_LIST(discard_urgent_util),
|
||||
ATTR_LIST(discard_granularity),
|
||||
ATTR_LIST(max_ordered_discard),
|
||||
ATTR_LIST(discard_io_aware),
|
||||
ATTR_LIST(pending_discard),
|
||||
ATTR_LIST(gc_mode),
|
||||
ATTR_LIST(ipu_policy),
|
||||
|
||||
@@ -351,7 +351,7 @@ static int show_map(struct seq_file *m, void *v)
|
||||
if (vma_pages(vma))
|
||||
show_map_vma(m, vma);
|
||||
|
||||
show_map_pad_vma(vma, pad_vma, m, show_map_vma);
|
||||
show_map_pad_vma(vma, pad_vma, m, show_map_vma, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -874,7 +874,7 @@ static int show_smap(struct seq_file *m, void *v)
|
||||
show_smap_vma_flags(m, vma);
|
||||
|
||||
show_pad:
|
||||
show_map_pad_vma(vma, pad_vma, m, (show_pad_vma_fn)show_smap);
|
||||
show_map_pad_vma(vma, pad_vma, m, show_smap, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,6 @@
|
||||
#define VM_PAD_MASK (VM_TOTAL_PAD_PAGES << VM_PAD_SHIFT)
|
||||
#define VMA_PAD_START(vma) (vma->vm_end - (vma_pad_pages(vma) << PAGE_SHIFT))
|
||||
|
||||
typedef void (*show_pad_vma_fn)(struct seq_file *m, struct vm_area_struct *vma);
|
||||
|
||||
#if PAGE_SIZE == SZ_4K && defined(CONFIG_64BIT)
|
||||
extern void vma_set_pad_pages(struct vm_area_struct *vma,
|
||||
unsigned long nr_pages);
|
||||
@@ -60,7 +58,7 @@ extern struct vm_area_struct *get_data_vma(struct vm_area_struct *vma);
|
||||
|
||||
extern void show_map_pad_vma(struct vm_area_struct *vma,
|
||||
struct vm_area_struct *pad,
|
||||
struct seq_file *m, show_pad_vma_fn func);
|
||||
struct seq_file *m, void *func, bool smaps);
|
||||
|
||||
extern void split_pad_vma(struct vm_area_struct *vma, struct vm_area_struct *new,
|
||||
unsigned long addr, int new_below);
|
||||
@@ -92,7 +90,7 @@ static inline struct vm_area_struct *get_data_vma(struct vm_area_struct *vma)
|
||||
|
||||
static inline void show_map_pad_vma(struct vm_area_struct *vma,
|
||||
struct vm_area_struct *pad,
|
||||
struct seq_file *m, show_pad_vma_fn func)
|
||||
struct seq_file *m, void *func, bool smaps)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
typedef void (*show_pad_maps_fn) (struct seq_file *m, struct vm_area_struct *vma);
|
||||
typedef int (*show_pad_smaps_fn) (struct seq_file *m, void *v);
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#if PAGE_SIZE == SZ_4K
|
||||
DEFINE_STATIC_KEY_TRUE(pgsize_migration_enabled);
|
||||
@@ -303,7 +306,7 @@ struct vm_area_struct *get_data_vma(struct vm_area_struct *vma)
|
||||
* and @pad.
|
||||
*/
|
||||
void show_map_pad_vma(struct vm_area_struct *vma, struct vm_area_struct *pad,
|
||||
struct seq_file *m, show_pad_vma_fn func)
|
||||
struct seq_file *m, void *func, bool smaps)
|
||||
{
|
||||
if (!pad)
|
||||
return;
|
||||
@@ -320,7 +323,10 @@ void show_map_pad_vma(struct vm_area_struct *vma, struct vm_area_struct *pad,
|
||||
*/
|
||||
BUG_ON(!vma);
|
||||
|
||||
func(m, pad);
|
||||
if (smaps)
|
||||
((show_pad_smaps_fn)func)(m, pad);
|
||||
else
|
||||
((show_pad_maps_fn)func)(m, pad);
|
||||
|
||||
kfree(pad);
|
||||
kfree(vma);
|
||||
|
||||
Reference in New Issue
Block a user