Files
linux-rockchip/include/linux/page_ext.h
Tao Huang cc17504307 Merge tag 'android12-5.10-2023-02_r1' of https://android.googlesource.com/kernel/common
android12-5.10 February 2023 release 1

Artifacts:
  https://ci.android.com/builds/submitted/9611440/kernel_aarch64/latest

* tag 'android12-5.10-2023-02_r1': (5560 commits)
  ANDROID: GKI: Enable ARM64_ERRATUM_2454944
  ANDROID: dma-ops: Add restricted vendor hook
  ANDROID: arm64: Work around Cortex-A510 erratum 2454944
  ANDROID: mm/vmalloc: Add override for lazy vunmap
  ANDROID: cpuidle-psci: Fix suspicious RCU usage
  ANDROID: ABI: update allowed list for galaxy
  FROMGIT: f2fs: add sysfs nodes to set last_age_weight
  FROMGIT: f2fs: fix wrong calculation of block age
  ANDROID: struct io_uring ABI preservation hack for 5.10.162 changes
  ANDROID: fix up struct task_struct ABI change in 5.10.162
  ANDROID: add flags variable back to struct proto_ops
  UPSTREAM: io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups
  UPSTREAM: eventfd: provide a eventfd_signal_mask() helper
  UPSTREAM: eventpoll: add EPOLL_URING_WAKE poll wakeup flag
  UPSTREAM: Revert "proc: don't allow async path resolution of /proc/self components"
  UPSTREAM: Revert "proc: don't allow async path resolution of /proc/thread-self components"
  UPSTREAM: net: remove cmsg restriction from io_uring based send/recvmsg calls
  UPSTREAM: task_work: unconditionally run task_work from get_signal()
  UPSTREAM: signal: kill JOBCTL_TASK_WORK
  UPSTREAM: io_uring: import 5.15-stable io_uring
  ...

Change-Id: I2b16474d6e3a91f1d702486ec6d1565a7bc310e3

Conflicts:
	Documentation/ABI/testing/configfs-usb-gadget-uac2
	Documentation/usb/gadget-testing.rst
	Makefile
	arch/arm/boot/dts/rk3288-evb-act8846.dts
	arch/arm64/mm/Makefile
	drivers/dma-buf/dma-buf.c
	drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
	drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
	drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/mmc/core/mmc.c
	drivers/pci/controller/dwc/pcie-designware-host.c
	drivers/pinctrl/pinctrl-rockchip.c
	drivers/regulator/core.c
	drivers/usb/dwc3/ep0.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/gadget/function/f_hid.c
	drivers/usb/gadget/function/f_uac1.c
	drivers/usb/gadget/function/f_uac2.c
	drivers/usb/gadget/function/u_audio.c
	drivers/usb/gadget/function/u_audio.h
	drivers/usb/gadget/function/u_uac2.h
	drivers/usb/host/xhci.h
	drivers/usb/storage/unusual_uas.h
	drivers/usb/typec/altmodes/displayport.c
	include/linux/page_ext.h
	mm/cma.c
	mm/page_ext.c
	sound/core/pcm_dmaengine.c
	sound/soc/codecs/hdmi-codec.c
	include/linux/stmmac.h
	sound/drivers/aloop.c
	drivers/pci/controller/dwc/pcie-designware.h
2023-03-14 09:44:51 +08:00

108 lines
2.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __LINUX_PAGE_EXT_H
#define __LINUX_PAGE_EXT_H
#include <linux/types.h>
#include <linux/stacktrace.h>
#include <linux/stackdepot.h>
struct pglist_data;
struct page_ext_operations {
size_t offset;
size_t size;
bool (*need)(void);
void (*init)(void);
};
#ifdef CONFIG_PAGE_EXTENSION
enum page_ext_flags {
PAGE_EXT_OWNER,
PAGE_EXT_OWNER_ALLOCATED,
#if defined(CONFIG_PAGE_IDLE_FLAG) && !defined(CONFIG_64BIT)
PAGE_EXT_YOUNG,
PAGE_EXT_IDLE,
#endif
};
/*
* Page Extension can be considered as an extended mem_map.
* A page_ext page is associated with every page descriptor. The
* page_ext helps us add more information about the page.
* All page_ext are allocated at boot or memory hotplug event,
* then the page_ext for pfn always exists.
*/
struct page_ext {
unsigned long flags;
};
extern bool early_page_ext;
extern unsigned long page_ext_size;
extern void pgdat_page_ext_init(struct pglist_data *pgdat);
static inline bool early_page_ext_enabled(void)
{
return early_page_ext;
}
#ifdef CONFIG_SPARSEMEM
static inline void page_ext_init_flatmem(void)
{
}
extern void page_ext_init(void);
static inline void page_ext_init_flatmem_late(void)
{
}
#else
extern void page_ext_init_flatmem(void);
extern void page_ext_init_flatmem_late(void);
static inline void page_ext_init(void)
{
}
#endif
extern struct page_ext *page_ext_get(struct page *page);
extern void page_ext_put(struct page_ext *page_ext);
static inline struct page_ext *page_ext_next(struct page_ext *curr)
{
void *next = curr;
next += page_ext_size;
return next;
}
#else /* !CONFIG_PAGE_EXTENSION */
struct page_ext;
static inline bool early_page_ext_enabled(void)
{
return false;
}
static inline void pgdat_page_ext_init(struct pglist_data *pgdat)
{
}
static inline void page_ext_init(void)
{
}
static inline void page_ext_init_flatmem_late(void)
{
}
static inline void page_ext_init_flatmem(void)
{
}
static inline struct page_ext *page_ext_get(struct page *page)
{
return NULL;
}
static inline void page_ext_put(struct page_ext *page_ext)
{
}
#endif /* CONFIG_PAGE_EXTENSION */
#endif /* __LINUX_PAGE_EXT_H */