Revert "qvm: resize vm during kernel boot"

This reverts commit d83c70b503.
The oom during bootup issue is resovled by removing
CAP_IPC_LOCK from userspace. Revert this patch since it was
only added as temporary fix.

Change-Id: I1cfbfeede2f0a779dd9de193eb52f5de18f91dd9
Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
This commit is contained in:
Sudarshan Rajagopalan 2023-07-05 11:59:58 -07:00
parent e236285a3d
commit deccd624eb
5 changed files with 0 additions and 26 deletions

View file

@ -21,7 +21,6 @@
static dev_t mem_buf_dev_no;
static struct class *mem_buf_class;
static struct cdev mem_buf_char_dev;
static bool mem_buf_ready;
union mem_buf_ioctl_arg {
struct mem_buf_alloc_ioctl_arg allocation;
@ -332,11 +331,6 @@ static const struct file_operations mem_buf_dev_fops = {
.compat_ioctl = compat_ptr_ioctl,
};
bool mem_buf_probe_complete(void)
{
return mem_buf_ready;
}
static int mem_buf_msgq_probe(struct platform_device *pdev)
{
int ret;
@ -362,7 +356,6 @@ static int mem_buf_msgq_probe(struct platform_device *pdev)
goto err_dev_create;
}
mem_buf_ready = true;
return 0;
err_dev_create:

View file

@ -41,10 +41,6 @@ static DEFINE_MUTEX(qvm_kernel_plugged_lock);
/* Sum of all hints */
static s64 qvm_hint_total;
void qvm_update_plugged_size(uint64_t size)
{
qvm_hint_total = (s64)size;
}
static uint64_t device_block_size, max_plugin_threshold;
static uint16_t kernel_plugged;

View file

@ -6,7 +6,6 @@
#define QTI_VIRTIO_MEM_PRIVATE_H
int virtio_mem_update_config_size(s64 size, bool sync);
void qvm_update_plugged_size(uint64_t size);
int virtio_mem_get_device_block_size(uint64_t *device_block_size);
int virtio_mem_get_max_plugin_threshold(uint64_t *max_plugin_threshold);

View file

@ -27,7 +27,6 @@
#include <linux/bitmap.h>
#include <linux/lockdep.h>
#include <linux/log2.h>
#include "qti_virtio_mem.h"
#include <linux/sched/mm.h>
#include <acpi/acpi_numa.h>
@ -287,8 +286,6 @@ struct virtio_mem {
static struct virtio_mem *virtio_mem_dev;
static DEFINE_XARRAY(xa_membuf);
#define NUM_BLOCKS_ADD_STARTUP 16
/*
* We have to share a single online_page callback among all virtio-mem
* devices. We use RCU to iterate the list in the callback.
@ -2821,7 +2818,6 @@ static int virtio_mem_init(struct virtio_mem *vm)
return -EINVAL;
}
vm->device_block_size = device_block_size;
vm->new_requested_size = vm->device_block_size * NUM_BLOCKS_ADD_STARTUP;
node_id = NUMA_NO_NODE;
vm->nid = virtio_mem_translate_node_id(vm, node_id);
@ -2917,9 +2913,6 @@ static int virtio_mem_probe(struct platform_device *vdev)
BUILD_BUG_ON(sizeof(struct virtio_mem_req) != 24);
BUILD_BUG_ON(sizeof(struct virtio_mem_resp) != 10);
if (!mem_buf_probe_complete())
return -EPROBE_DEFER;
vm = kzalloc(sizeof(*vm), GFP_KERNEL);
if (!vm)
return -ENOMEM;
@ -2948,10 +2941,8 @@ static int virtio_mem_probe(struct platform_device *vdev)
if (!vm->in_kdump) {
atomic_set(&vm->config_changed, 1);
queue_work(system_freezable_wq, &vm->wq);
flush_work(&vm->wq);
}
qvm_update_plugged_size(vm->plugged_size);
return 0;
out_free_vm:

View file

@ -118,7 +118,6 @@ void *mem_buf_alloc(struct mem_buf_allocation_data *alloc_data);
void mem_buf_free(void *membuf);
struct gh_sgl_desc *mem_buf_get_sgl(void *membuf);
int mem_buf_current_vmid(void);
bool mem_buf_probe_complete(void);
#else
static inline void *mem_buf_alloc(struct mem_buf_allocation_data *alloc_data)
@ -136,10 +135,6 @@ static inline int mem_buf_current_vmid(void)
{
return -EINVAL;
}
static inline bool mem_buf_probe_complete(void)
{
return false;
}
#endif /* CONFIG_QCOM_MEM_BUF */