mirror of
https://github.com/revyos/thead-kernel.git
synced 2026-06-21 17:22:24 +02:00
Compare commits
36 Commits
update/1.4
...
fix-toolch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7577e63a0 | ||
|
|
7f7fc491ac | ||
|
|
9e89f40c76 | ||
|
|
58b9ba8b4d | ||
|
|
e15402b7ab | ||
|
|
bbf24fc7fa | ||
|
|
2030eb1b71 | ||
|
|
bc4c98ebd7 | ||
|
|
1b0b255060 | ||
|
|
8b9aa1faa1 | ||
|
|
aee62929de | ||
|
|
3478bb910d | ||
|
|
e95535c32a | ||
|
|
90bcc90cb8 | ||
|
|
833d4accd7 | ||
|
|
fa953236e1 | ||
|
|
71b7c456fa | ||
|
|
84b184c6c3 | ||
|
|
1223f3c597 | ||
|
|
1881bc9051 | ||
|
|
a86c91b80b | ||
|
|
b65595ebbc | ||
|
|
c6d4e5df18 | ||
|
|
931828f822 | ||
|
|
a637afb34d | ||
|
|
6563ff55d9 | ||
|
|
a3383ac8be | ||
|
|
0808b41c96 | ||
|
|
dda416a8b2 | ||
|
|
618138e424 | ||
|
|
82c0c62303 | ||
|
|
061f7f8738 | ||
|
|
1f1380d124 | ||
|
|
c75d368ffa | ||
|
|
7989ccb780 | ||
|
|
bcb9ecc2c3 |
72
.github/workflows/kernel.yml
vendored
72
.github/workflows/kernel.yml
vendored
@@ -8,16 +8,16 @@ on:
|
||||
- cron: "0 2 * * *"
|
||||
|
||||
env:
|
||||
xuantie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1698113812618
|
||||
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-20231018.tar.gz
|
||||
mainline_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.10.18
|
||||
mainline_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2023.10.18-nightly.tar.gz
|
||||
xuantie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395627867
|
||||
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1-20240115.tar.gz
|
||||
mainline_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.03.01
|
||||
mainline_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2024.03.01-nightly.tar.gz
|
||||
wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0'
|
||||
ARCH: riscv
|
||||
board: lpi4a
|
||||
board: th1520
|
||||
KBUILD_BUILD_USER: builder
|
||||
KBUILD_BUILD_HOST: revyos-riscv-builder
|
||||
KDEB_COMPRESS: xz
|
||||
KDEB_COMPRESS: none
|
||||
KDEB_CHANGELOG_DIST: unstable
|
||||
|
||||
jobs:
|
||||
@@ -25,22 +25,27 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
name: [thead-gcc, gcc-13]
|
||||
board: [lpi4a, ahead]
|
||||
include:
|
||||
- name: gcc-13
|
||||
cross: riscv64-unknown-linux-gnu-
|
||||
machine: ubuntu-22.04
|
||||
run_image: ghcr.io/revyos/revyos-kernel-builder:amd64-2024.04.02
|
||||
- name: thead-gcc
|
||||
cross: riscv64-unknown-linux-gnu-
|
||||
machine: ubuntu-22.04
|
||||
run_image: ghcr.io/revyos/revyos-kernel-builder:amd64-2024.04.02
|
||||
- name: native
|
||||
cross: riscv64-linux-gnu-
|
||||
machine: [ self-hosted, Linux, riscv64 ]
|
||||
run_image: ghcr.io/revyos/revyos-kernel-builder:riscv64-2024.04.02
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ${{ matrix.machine }}
|
||||
container:
|
||||
image: ${{ matrix.run_image }}
|
||||
env:
|
||||
CROSS_COMPILE: riscv64-unknown-linux-gnu-
|
||||
CROSS_COMPILE: ${{ matrix.cross }}
|
||||
|
||||
steps:
|
||||
- name: Install software
|
||||
run: |
|
||||
sudo apt update && \
|
||||
sudo apt install -y gdisk dosfstools g++-12-riscv64-linux-gnu build-essential \
|
||||
libncurses-dev gawk flex bison openssl libssl-dev tree \
|
||||
dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf device-tree-compiler \
|
||||
devscripts pahole
|
||||
|
||||
- name: Checkout kernel
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -52,37 +57,40 @@ jobs:
|
||||
if [[ ${{ matrix.name }} = "thead-gcc" ]]; then
|
||||
${wget_alias} ${xuantie_toolchain}/${toolchain_file_name}
|
||||
tar -xvf ${toolchain_file_name} -C /opt
|
||||
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0/bin:$PATH"
|
||||
else
|
||||
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1/bin:$PATH"
|
||||
elif [[ ${{ matrix.name }} = "gcc-13" ]]; then
|
||||
${wget_alias} ${mainline_toolchain}/${mainline_toolchain_file_name}
|
||||
tar -xvf ${mainline_toolchain_file_name} -C /opt
|
||||
export PATH="/opt/riscv/bin:$PATH"
|
||||
else
|
||||
echo "No download toolchain."
|
||||
fi
|
||||
${CROSS_COMPILE}gcc -v
|
||||
|
||||
pushd kernel
|
||||
if [ x"${{ matrix.board }}" = x"lpi4a" ]; then
|
||||
make revyos_defconfig
|
||||
elif [ x"${{ matrix.board }}" = x"ahead" ]; then
|
||||
make revyos_beaglev_defconfig
|
||||
fi
|
||||
export KDEB_PKGVERSION="$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)"
|
||||
make revyos_defconfig
|
||||
export KDEB_PKGVERSION="$(make kernelversion)-$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)"
|
||||
sed -i '/CONFIG_LOCALVERSION_AUTO/d' .config && echo "CONFIG_LOCALVERSION_AUTO=n" >> .config
|
||||
cat .config | grep "CONFIG_THEAD_ISA"
|
||||
make -j$(nproc) bindeb-pkg LOCALVERSION="-${{ matrix.board }}"
|
||||
|
||||
if [ `uname -m` = "riscv64" ]; then
|
||||
# FIXME: force use 32 thread
|
||||
make -j32 bindeb-pkg LOCALVERSION="-${board}"
|
||||
else
|
||||
make -j$(nproc) bindeb-pkg LOCALVERSION="-${board}"
|
||||
fi
|
||||
|
||||
# Copy deb
|
||||
sudo dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/rootfs/
|
||||
dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/rootfs/
|
||||
|
||||
# record commit-id
|
||||
git rev-parse HEAD > ${{ matrix.board }}-kernel-commitid
|
||||
sudo cp -v ${{ matrix.board }}-kernel-commitid ${GITHUB_WORKSPACE}/rootfs/
|
||||
git rev-parse HEAD > kernel-commitid
|
||||
cp -v kernel-commitid ${GITHUB_WORKSPACE}/rootfs/
|
||||
|
||||
ls -al ${GITHUB_WORKSPACE}/rootfs/
|
||||
popd
|
||||
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: thead-kernel-${{ matrix.name }}
|
||||
path: rootfs/*
|
||||
|
||||
@@ -385,6 +385,28 @@ config RISCV_BASE_PMU
|
||||
|
||||
endmenu
|
||||
|
||||
config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
def_bool y
|
||||
# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
|
||||
depends on AS_IS_GNU && AS_VERSION >= 23800
|
||||
help
|
||||
Newer binutils versions default to ISA spec version 20191213 which
|
||||
moves some instructions from the I extension to the Zicsr and Zifencei
|
||||
extensions.
|
||||
|
||||
config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||
def_bool y
|
||||
depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
# https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
|
||||
depends on CC_IS_CLANG && CLANG_VERSION < 170000
|
||||
help
|
||||
Certain versions of clang do not support zicsr and zifencei via -march
|
||||
but newer versions of binutils require it for the reasons noted in the
|
||||
help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
|
||||
option causes an older ISA spec compatible with these older versions
|
||||
of clang to be passed to GAS, which has the same result as passing zicsr
|
||||
and zifencei to -march.
|
||||
|
||||
config FPU
|
||||
bool "FPU support"
|
||||
default y
|
||||
|
||||
@@ -60,10 +60,12 @@ riscv-march-$(toolchain-have-v0p7) := $(riscv-march-y)v0p7
|
||||
toolchain-have-xtheadc := $(call cc-option-yn, -march=$(riscv-march-y)_xtheadc)
|
||||
riscv-march-$(toolchain-have-xtheadc) := $(riscv-march-y)_xtheadc
|
||||
|
||||
# Newer binutils versions default to ISA spec version 20191213 which moves some
|
||||
# instructions from the I extension to the Zicsr and Zifencei extensions.
|
||||
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
|
||||
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei
|
||||
ifdef CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||
KBUILD_CFLAGS += -Wa,-misa-spec=2.2
|
||||
KBUILD_AFLAGS += -Wa,-misa-spec=2.2
|
||||
else
|
||||
riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
|
||||
endif
|
||||
|
||||
KBUILD_CFLAGS += -march=$(subst _xtheadc,,$(subst v0p7,,$(subst fd,,$(riscv-march-y))))
|
||||
KBUILD_AFLAGS += -march=$(riscv-march-y)
|
||||
|
||||
@@ -5,7 +5,8 @@ dtbo-$(CONFIG_SOC_THEAD) += \
|
||||
BBORG_RELAY-00A2.dtbo \
|
||||
BONE-LED_P8_03.dtbo \
|
||||
BONE-LED_P9_11.dtbo \
|
||||
BVA-MIKROBUS-0.dtbo
|
||||
BVA-MIKROBUS-0.dtbo \
|
||||
meles-wifibt-external-antenna.dtbo
|
||||
|
||||
targets += dtbs dtbs_install
|
||||
targets += $(dtbo-y)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
fragment@0 {
|
||||
target-path = "/";
|
||||
|
||||
__overlay__ {
|
||||
ext_antenna: ext-antenna {
|
||||
status = "okay";
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-low;
|
||||
gpio = <&gpio1_porta 24 1>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "ext_antenna";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&board_antenna>;
|
||||
|
||||
__overlay__ {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/ {
|
||||
model = "T-HEAD Light Lichee Pi 4A configuration for LicheeConsole4A";
|
||||
compatible = "thead,light", "sipeed,th1520-laptop", "sipeed,console4a";
|
||||
};
|
||||
|
||||
&dsi0_panel0 {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
/ {
|
||||
model = "T-HEAD Light Lichee Pi 4A configuration for 8GB DDR board use on laptop";
|
||||
compatible = "thead,light", "sipeed,th1520-laptop";
|
||||
|
||||
reg_sys_vcc_5v: regulator-sys-vcc-5v-en {
|
||||
status = "okay";
|
||||
@@ -19,12 +20,15 @@
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
|
||||
// suspend for lichee laptop is not ready so dont turn it off
|
||||
/*
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
regulator-state-standby {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
reg_sys_vcc_3v3: regulator-sys-vcc-3v3-en {
|
||||
@@ -115,7 +119,7 @@
|
||||
charger: dc-charger {
|
||||
compatible = "gpio-charger";
|
||||
charger-type = "mains";
|
||||
gpios = <&ao_gpio_porta 2 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&gpio0_porta 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -228,6 +232,7 @@
|
||||
|
||||
&uart3 {
|
||||
clock-frequency = <100000000>;
|
||||
pinctrl-0 = <&pinctrl_uart3_tx_is_gpio>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -296,10 +296,10 @@
|
||||
debounce-interval = <1>;
|
||||
gpios = <&gpio2_porta 25 0x1>;
|
||||
};
|
||||
key-sleep {
|
||||
label = "Sleep Wake Key";
|
||||
key-wake {
|
||||
label = "Wake Key";
|
||||
wakeup-source;
|
||||
linux,code = <KEY_SLEEP>;
|
||||
linux,code = <KEY_WAKEUP>;
|
||||
debounce-interval = <1>;
|
||||
gpios = <&ao_gpio_porta 2 0x1>;
|
||||
};
|
||||
@@ -1105,6 +1105,16 @@
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
pinctrl_uart3_tx_is_gpio: uart3txisgpiogrp {
|
||||
thead,pins = <
|
||||
FM_UART3_TXD 0x3 0x202
|
||||
FM_UART3_RXD 0x1 0x202
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
pinctrl_wifi_wake: wifi_grp {
|
||||
thead,pins = <
|
||||
FM_GPIO0_27 0x0 0x202
|
||||
|
||||
@@ -265,15 +265,36 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
vcc_usb_en: regulator-usb-en {
|
||||
usb_vbus_en: regulator-usb-vbus-en {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc_usb_en";
|
||||
regulator-name = "usb_vbus_en";
|
||||
gpio = <&gpio0_porta 27 0>; /* GPIO_ACTIVE_HIGH: 0 */
|
||||
enable-active-high;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* Select USB3.0 Type-A port */
|
||||
usb_select: regulator-usb-select {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb_select";
|
||||
gpio = <&gpio2_porta 30 1>; /* GPIO_ACTIVE_LOW: 1 */
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
board_antenna: board-antenna {
|
||||
status = "okay";
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio1_porta 24 0>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-name = "board_antenna";
|
||||
};
|
||||
|
||||
aon {
|
||||
compatible = "thead,light-aon";
|
||||
mbox-names = "aon";
|
||||
|
||||
@@ -187,6 +187,7 @@ CONFIG_AIC_FW_PATH="/lib/firmware/aic8800"
|
||||
CONFIG_AIC8800_WLAN_SUPPORT=m
|
||||
CONFIG_AIC8800_BTLPM_SUPPORT=m
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_JOYDEV=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
@@ -400,6 +401,22 @@ CONFIG_MMC_SDHCI_OF_DWCMSHC=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
CONFIG_LEDS_TRIGGER_MTD=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_ACTIVITY=y
|
||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
||||
CONFIG_LEDS_TRIGGER_CAMERA=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_LEDS_TRIGGER_NETDEV=y
|
||||
CONFIG_LEDS_TRIGGER_PATTERN=y
|
||||
CONFIG_LEDS_TRIGGER_AUDIO=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_XGENE=y
|
||||
CONFIG_DMADEVICES=y
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
MODULE_DESCRIPTION("Vivante Graphics Driver");
|
||||
MODULE_LICENSE("Dual MIT/GPL");
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
static struct class* gpuClass = NULL;
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
#define PVRSRV_RGX_LOG2_CLIENT_CCB_MAX_SIZE_TDM 17
|
||||
#define PVRSRV_RGX_LOG2_CLIENT_CCB_MAX_SIZE_RDM 15
|
||||
#define SUPPORT_BUFFER_SYNC 1
|
||||
#define SUPPORT_LINUX_DVFS 1
|
||||
#ifdef CONFIG_DRM_POWERVR_ROGUE_DEBUG
|
||||
#define DEBUG
|
||||
#define DEBUG_BRIDGE_KM
|
||||
|
||||
@@ -43,7 +43,6 @@ override SUPPORT_DI_BRG_IMPL := 1
|
||||
override SUPPORT_NATIVE_FENCE_SYNC := 1
|
||||
override SUPPORT_DMA_FENCE := 1
|
||||
override SUPPORT_BUFFER_SYNC := 1
|
||||
override SUPPORT_LINUX_DVFS := 1
|
||||
ifeq ($(CONFIG_DRM_POWERVR_ROGUE_DEBUG),y)
|
||||
override BUILD := debug
|
||||
override PVRSRV_ENABLE_GPU_MEMORY_INFO := 1
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
/*************************************************************************/ /*!
|
||||
@File pvr_dvfs.h
|
||||
@Title System level interface for DVFS
|
||||
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
|
||||
@License Dual MIT/GPLv2
|
||||
|
||||
The contents of this file are subject to the MIT license as set out below.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 2 ("GPL") in which case the provisions
|
||||
of GPL are applicable instead of those above.
|
||||
|
||||
If you wish to allow use of your version of this file only under the terms of
|
||||
GPL, and not to allow others to use your version of this file under the terms
|
||||
of the MIT license, indicate your decision by deleting the provisions above
|
||||
and replace them with the notice and other provisions required by GPL as set
|
||||
out in the file called "GPL-COPYING" included in this distribution. If you do
|
||||
not delete the provisions above, a recipient may use your version of this file
|
||||
under the terms of either the MIT license or GPL.
|
||||
|
||||
This License is also included in this distribution in the file called
|
||||
"MIT-COPYING".
|
||||
|
||||
EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
|
||||
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/ /**************************************************************************/
|
||||
|
||||
#ifndef PVR_DVFS_H
|
||||
#define PVR_DVFS_H
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
#if defined(SUPPORT_LINUX_DVFS)
|
||||
#include <linux/devfreq.h>
|
||||
#include <linux/thermal.h>
|
||||
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
#include <linux/devfreq_cooling.h>
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
|
||||
#include <linux/opp.h>
|
||||
#else
|
||||
#include <linux/pm_opp.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "img_types.h"
|
||||
|
||||
typedef void (*PFN_SYS_DEV_DVFS_SET_FREQUENCY)(IMG_UINT32 ui32Freq);
|
||||
typedef void (*PFN_SYS_DEV_DVFS_SET_VOLTAGE)(IMG_UINT32 ui32Volt);
|
||||
|
||||
typedef struct _IMG_OPP_
|
||||
{
|
||||
IMG_UINT32 ui32Volt;
|
||||
/*
|
||||
* Unit of frequency in Hz.
|
||||
*/
|
||||
IMG_UINT32 ui32Freq;
|
||||
} IMG_OPP;
|
||||
|
||||
typedef struct _IMG_DVFS_DEVICE_CFG_
|
||||
{
|
||||
const IMG_OPP *pasOPPTable;
|
||||
IMG_UINT32 ui32OPPTableSize;
|
||||
#if defined(SUPPORT_LINUX_DVFS)
|
||||
IMG_UINT32 ui32PollMs;
|
||||
#endif
|
||||
IMG_BOOL bIdleReq;
|
||||
PFN_SYS_DEV_DVFS_SET_FREQUENCY pfnSetFrequency;
|
||||
PFN_SYS_DEV_DVFS_SET_VOLTAGE pfnSetVoltage;
|
||||
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL) && defined(SUPPORT_LINUX_DVFS)
|
||||
struct devfreq_cooling_power *psPowerOps;
|
||||
#endif
|
||||
} IMG_DVFS_DEVICE_CFG;
|
||||
|
||||
#if defined(SUPPORT_LINUX_DVFS)
|
||||
typedef struct _IMG_DVFS_GOVERNOR_
|
||||
{
|
||||
IMG_BOOL bEnabled;
|
||||
} IMG_DVFS_GOVERNOR;
|
||||
|
||||
typedef struct _IMG_DVFS_GOVERNOR_CFG_
|
||||
{
|
||||
IMG_UINT32 ui32UpThreshold;
|
||||
IMG_UINT32 ui32DownDifferential;
|
||||
} IMG_DVFS_GOVERNOR_CFG;
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(SUPPORT_LINUX_DVFS)
|
||||
typedef struct _IMG_DVFS_DEVICE_
|
||||
{
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
|
||||
struct opp *psOPP;
|
||||
#else
|
||||
struct dev_pm_opp *psOPP;
|
||||
#endif
|
||||
struct devfreq *psDevFreq;
|
||||
IMG_BOOL bInitPending;
|
||||
IMG_BOOL bReady;
|
||||
IMG_BOOL bEnabled;
|
||||
IMG_HANDLE hGpuUtilUserDVFS;
|
||||
struct devfreq_simple_ondemand_data data;
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
struct thermal_cooling_device *psDevfreqCoolingDevice;
|
||||
#endif
|
||||
} IMG_DVFS_DEVICE;
|
||||
#endif
|
||||
|
||||
typedef struct _IMG_DVFS_
|
||||
{
|
||||
#if defined(SUPPORT_LINUX_DVFS)
|
||||
IMG_DVFS_DEVICE sDVFSDevice;
|
||||
IMG_DVFS_GOVERNOR sDVFSGovernor;
|
||||
IMG_DVFS_GOVERNOR_CFG sDVFSGovernorCfg;
|
||||
#endif
|
||||
IMG_DVFS_DEVICE_CFG sDVFSDeviceCfg;
|
||||
} PVRSRV_DVFS;
|
||||
#endif/* (__linux__) */
|
||||
|
||||
#endif /* PVR_DVFS_H */
|
||||
@@ -1,824 +0,0 @@
|
||||
/*************************************************************************/ /*!
|
||||
@File
|
||||
@Title PowerVR devfreq device implementation
|
||||
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
|
||||
@Description Linux module setup
|
||||
@License Dual MIT/GPLv2
|
||||
|
||||
The contents of this file are subject to the MIT license as set out below.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 2 ("GPL") in which case the provisions
|
||||
of GPL are applicable instead of those above.
|
||||
|
||||
If you wish to allow use of your version of this file only under the terms of
|
||||
GPL, and not to allow others to use your version of this file under the terms
|
||||
of the MIT license, indicate your decision by deleting the provisions above
|
||||
and replace them with the notice and other provisions required by GPL as set
|
||||
out in the file called "GPL-COPYING" included in this distribution. If you do
|
||||
not delete the provisions above, a recipient may use your version of this file
|
||||
under the terms of either the MIT license or GPL.
|
||||
|
||||
This License is also included in this distribution in the file called
|
||||
"MIT-COPYING".
|
||||
|
||||
EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
|
||||
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/ /**************************************************************************/
|
||||
|
||||
#if !defined(NO_HARDWARE)
|
||||
|
||||
#include <linux/devfreq.h>
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
#include <linux/devfreq_cooling.h>
|
||||
#endif
|
||||
#include <linux/version.h>
|
||||
#include <linux/device.h>
|
||||
#include <drm/drm.h>
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0))
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_file.h>
|
||||
#else
|
||||
#include <drm/drmP.h>
|
||||
#endif
|
||||
|
||||
#include "power.h"
|
||||
#include "pvrsrv.h"
|
||||
#include "pvrsrv_device.h"
|
||||
|
||||
#include "rgxdevice.h"
|
||||
#include "rgxinit.h"
|
||||
#include "sofunc_rgx.h"
|
||||
|
||||
#include "syscommon.h"
|
||||
|
||||
#include "pvr_dvfs_device.h"
|
||||
|
||||
#include "kernel_compatibility.h"
|
||||
|
||||
static int _device_get_devid(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
int deviceId;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0))
|
||||
/*
|
||||
* Older kernels do not have render drm_minor member in drm_device,
|
||||
* so we fallback to primary node for device identification
|
||||
*/
|
||||
deviceId = ddev->primary->index;
|
||||
#else
|
||||
if (ddev->render)
|
||||
deviceId = ddev->render->index;
|
||||
else /* when render node is NULL, fallback to primary node */
|
||||
deviceId = ddev->primary->index;
|
||||
#endif
|
||||
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
static IMG_INT32 devfreq_target(struct device *dev, unsigned long *requested_freq, IMG_UINT32 flags)
|
||||
{
|
||||
int deviceId = _device_get_devid(dev);
|
||||
PVRSRV_DEVICE_NODE *psDeviceNode = PVRSRVGetDeviceInstanceByOSId(deviceId);
|
||||
RGX_DATA *psRGXData = NULL;
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
IMG_DVFS_DEVICE_CFG *psDVFSDeviceCfg = NULL;
|
||||
RGX_TIMING_INFORMATION *psRGXTimingInfo = NULL;
|
||||
IMG_UINT32 ui32Freq, ui32CurFreq, ui32Volt;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
|
||||
struct opp *opp;
|
||||
#else
|
||||
struct dev_pm_opp *opp;
|
||||
#endif
|
||||
|
||||
/* Check the device is registered */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
psRGXData = (RGX_DATA*) psDeviceNode->psDevConfig->hDevData;
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDVFSDeviceCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSDeviceCfg;
|
||||
|
||||
/* Check the RGX device is initialised */
|
||||
if (!psRGXData)
|
||||
{
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
psRGXTimingInfo = psRGXData->psRGXTimingInfo;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
rcu_read_lock();
|
||||
#endif
|
||||
|
||||
opp = devfreq_recommended_opp(dev, requested_freq, flags);
|
||||
if (IS_ERR(opp)) {
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
rcu_read_unlock();
|
||||
#endif
|
||||
PVR_DPF((PVR_DBG_ERROR, "Invalid OPP"));
|
||||
return PTR_ERR(opp);
|
||||
}
|
||||
|
||||
ui32Freq = dev_pm_opp_get_freq(opp);
|
||||
ui32Volt = dev_pm_opp_get_voltage(opp);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
rcu_read_unlock();
|
||||
#else
|
||||
dev_pm_opp_put(opp);
|
||||
#endif
|
||||
|
||||
ui32CurFreq = psRGXTimingInfo->ui32CoreClockSpeed;
|
||||
|
||||
if (ui32CurFreq == ui32Freq)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (psDeviceNode->eCurrentSysPowerState != PVRSRV_SYS_POWER_STATE_ON)
|
||||
{
|
||||
*requested_freq = psRGXTimingInfo->ui32CoreClockSpeed;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (PVRSRV_OK != PVRSRVDevicePreClockSpeedChange(psDeviceNode,
|
||||
psDVFSDeviceCfg->bIdleReq,
|
||||
NULL))
|
||||
{
|
||||
dev_err(dev, "PVRSRVDevicePreClockSpeedChange failed\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (!psDVFSDevice->bEnabled)
|
||||
{
|
||||
*requested_freq = psRGXTimingInfo->ui32CoreClockSpeed;
|
||||
goto ClockSpeedChangePost;
|
||||
}
|
||||
|
||||
/* Increasing frequency, change voltage first */
|
||||
if (ui32Freq > ui32CurFreq)
|
||||
{
|
||||
psDVFSDeviceCfg->pfnSetVoltage(ui32Volt);
|
||||
}
|
||||
|
||||
psDVFSDeviceCfg->pfnSetFrequency(ui32Freq);
|
||||
|
||||
/* Decreasing frequency, change frequency first */
|
||||
if (ui32Freq < ui32CurFreq)
|
||||
{
|
||||
psDVFSDeviceCfg->pfnSetVoltage(ui32Volt);
|
||||
}
|
||||
|
||||
psRGXTimingInfo->ui32CoreClockSpeed = ui32Freq;
|
||||
|
||||
ClockSpeedChangePost:
|
||||
PVRSRVDevicePostClockSpeedChange(psDeviceNode, psDVFSDeviceCfg->bIdleReq,
|
||||
NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int devfreq_get_dev_status(struct device *dev, struct devfreq_dev_status *stat)
|
||||
{
|
||||
int deviceId = _device_get_devid(dev);
|
||||
PVRSRV_DEVICE_NODE *psDeviceNode = PVRSRVGetDeviceInstanceByOSId(deviceId);
|
||||
PVRSRV_RGXDEV_INFO *psDevInfo = NULL;
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
RGX_DATA *psRGXData = NULL;
|
||||
RGX_TIMING_INFORMATION *psRGXTimingInfo = NULL;
|
||||
RGXFWIF_GPU_UTIL_STATS sGpuUtilStats;
|
||||
PVRSRV_ERROR eError;
|
||||
|
||||
/* Check the device is registered */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
psDevInfo = psDeviceNode->pvDevice;
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psRGXData = (RGX_DATA*) psDeviceNode->psDevConfig->hDevData;
|
||||
|
||||
/* Check the RGX device is initialised */
|
||||
if (!psDevInfo || !psRGXData)
|
||||
{
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
psRGXTimingInfo = psRGXData->psRGXTimingInfo;
|
||||
stat->current_frequency = psRGXTimingInfo->ui32CoreClockSpeed;
|
||||
|
||||
if (psDevInfo->pfnGetGpuUtilStats == NULL)
|
||||
{
|
||||
/* Not yet ready. So set times to something sensible. */
|
||||
stat->busy_time = 0;
|
||||
stat->total_time = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
eError = psDevInfo->pfnGetGpuUtilStats(psDeviceNode,
|
||||
psDVFSDevice->hGpuUtilUserDVFS,
|
||||
&sGpuUtilStats);
|
||||
|
||||
if (eError != PVRSRV_OK)
|
||||
{
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
stat->busy_time = sGpuUtilStats.ui64GpuStatActive;
|
||||
stat->total_time = sGpuUtilStats.ui64GpuStatCumulative;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
static IMG_INT32 devfreq_cur_freq(struct device *dev, unsigned long *freq)
|
||||
{
|
||||
int deviceId = _device_get_devid(dev);
|
||||
PVRSRV_DEVICE_NODE *psDeviceNode = PVRSRVGetDeviceInstanceByOSId(deviceId);
|
||||
RGX_DATA *psRGXData = NULL;
|
||||
|
||||
/* Check the device is registered */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
psRGXData = (RGX_DATA*) psDeviceNode->psDevConfig->hDevData;
|
||||
|
||||
/* Check the RGX device is initialised */
|
||||
if (!psRGXData)
|
||||
{
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
*freq = psRGXData->psRGXTimingInfo->ui32CoreClockSpeed;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct devfreq_dev_profile img_devfreq_dev_profile =
|
||||
{
|
||||
.target = devfreq_target,
|
||||
.get_dev_status = devfreq_get_dev_status,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
.get_cur_freq = devfreq_cur_freq,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int FillOPPTable(struct device *dev, PVRSRV_DEVICE_NODE *psDeviceNode)
|
||||
{
|
||||
const IMG_OPP *iopp;
|
||||
int i, err = 0;
|
||||
IMG_DVFS_DEVICE_CFG *psDVFSDeviceCfg = NULL;
|
||||
|
||||
/* Check the device exists */
|
||||
if (!dev || !psDeviceNode)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
psDVFSDeviceCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSDeviceCfg;
|
||||
|
||||
for (i = 0, iopp = psDVFSDeviceCfg->pasOPPTable;
|
||||
i < psDVFSDeviceCfg->ui32OPPTableSize;
|
||||
i++, iopp++)
|
||||
{
|
||||
err = dev_pm_opp_add(dev, iopp->ui32Freq, iopp->ui32Volt);
|
||||
if (err) {
|
||||
dev_err(dev, "Could not add OPP entry, %d\n", err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ClearOPPTable(struct device *dev, PVRSRV_DEVICE_NODE *psDeviceNode)
|
||||
{
|
||||
#if (defined(CHROMIUMOS_KERNEL) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))) || \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
|
||||
const IMG_OPP *iopp;
|
||||
int i;
|
||||
IMG_DVFS_DEVICE_CFG *psDVFSDeviceCfg = NULL;
|
||||
|
||||
/* Check the device exists */
|
||||
if (!dev || !psDeviceNode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
psDVFSDeviceCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSDeviceCfg;
|
||||
|
||||
for (i = 0, iopp = psDVFSDeviceCfg->pasOPPTable;
|
||||
i < psDVFSDeviceCfg->ui32OPPTableSize;
|
||||
i++, iopp++)
|
||||
{
|
||||
dev_pm_opp_remove(dev, iopp->ui32Freq);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int GetOPPValues(struct device *dev,
|
||||
unsigned long *min_freq,
|
||||
unsigned long *min_volt,
|
||||
unsigned long *max_freq)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
|
||||
struct opp *opp;
|
||||
#else
|
||||
struct dev_pm_opp *opp;
|
||||
#endif
|
||||
int count, i, err = 0;
|
||||
unsigned long freq;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)) && \
|
||||
(!defined(CHROMIUMOS_KERNEL) || (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)))
|
||||
unsigned int *freq_table;
|
||||
#else
|
||||
unsigned long *freq_table;
|
||||
#endif
|
||||
|
||||
count = dev_pm_opp_get_opp_count(dev);
|
||||
if (count < 0)
|
||||
{
|
||||
dev_err(dev, "Could not fetch OPP count, %d\n", count);
|
||||
return count;
|
||||
}
|
||||
|
||||
dev_info(dev, "Found %d OPP points.\n", count);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
freq_table = devm_kcalloc(dev, count, sizeof(*freq_table), GFP_ATOMIC);
|
||||
#else
|
||||
freq_table = kcalloc(count, sizeof(*freq_table), GFP_ATOMIC);
|
||||
#endif
|
||||
if (! freq_table)
|
||||
{
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
/* Start RCU read-side critical section to map frequency to OPP */
|
||||
rcu_read_lock();
|
||||
#endif
|
||||
|
||||
/* Iterate over OPP table; Iteration 0 finds "opp w/ freq >= 0 Hz". */
|
||||
freq = 0;
|
||||
opp = dev_pm_opp_find_freq_ceil(dev, &freq);
|
||||
if (IS_ERR(opp))
|
||||
{
|
||||
err = PTR_ERR(opp);
|
||||
dev_err(dev, "Couldn't find lowest frequency, %d\n", err);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
*min_volt = dev_pm_opp_get_voltage(opp);
|
||||
*max_freq = *min_freq = freq_table[0] = freq;
|
||||
dev_info(dev, "opp[%d/%d]: (%lu Hz, %lu uV)\n", 1, count, freq, *min_volt);
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||
dev_pm_opp_put(opp);
|
||||
#endif
|
||||
|
||||
/* Iteration i > 0 finds "opp w/ freq >= (opp[i-1].freq + 1)". */
|
||||
for (i = 1; i < count; i++)
|
||||
{
|
||||
freq++;
|
||||
opp = dev_pm_opp_find_freq_ceil(dev, &freq);
|
||||
if (IS_ERR(opp))
|
||||
{
|
||||
err = PTR_ERR(opp);
|
||||
dev_err(dev, "Couldn't find %dth frequency, %d\n", i, err);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
freq_table[i] = freq;
|
||||
*max_freq = freq;
|
||||
dev_info(dev,
|
||||
"opp[%d/%d]: (%lu Hz, %lu uV)\n",
|
||||
i + 1,
|
||||
count,
|
||||
freq,
|
||||
dev_pm_opp_get_voltage(opp));
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||
dev_pm_opp_put(opp);
|
||||
#endif
|
||||
}
|
||||
|
||||
exit:
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0))
|
||||
rcu_read_unlock();
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
|
||||
if (!err)
|
||||
{
|
||||
img_devfreq_dev_profile.freq_table = freq_table;
|
||||
img_devfreq_dev_profile.max_state = count;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
|
||||
devm_kfree(dev, freq_table);
|
||||
#else
|
||||
kfree(freq_table);
|
||||
#endif
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
static int RegisterCoolingDevice(struct device *dev,
|
||||
IMG_DVFS_DEVICE *psDVFSDevice,
|
||||
struct devfreq_cooling_power *powerOps)
|
||||
{
|
||||
struct device_node *of_node;
|
||||
int err = 0;
|
||||
PVRSRV_VZ_RET_IF_MODE(GUEST, err);
|
||||
|
||||
if (!psDVFSDevice)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!powerOps)
|
||||
{
|
||||
dev_info(dev, "Cooling: power ops not registered, not enabling cooling");
|
||||
return 0;
|
||||
}
|
||||
|
||||
of_node = of_node_get(dev->of_node);
|
||||
|
||||
psDVFSDevice->psDevfreqCoolingDevice = of_devfreq_cooling_register_power(
|
||||
of_node, psDVFSDevice->psDevFreq, powerOps);
|
||||
|
||||
if (IS_ERR(psDVFSDevice->psDevfreqCoolingDevice))
|
||||
{
|
||||
err = PTR_ERR(psDVFSDevice->psDevfreqCoolingDevice);
|
||||
dev_err(dev, "Failed to register as devfreq cooling device %d", err);
|
||||
}
|
||||
|
||||
of_node_put(of_node);
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define TO_IMG_ERR(err) ((err == -EPROBE_DEFER) ? PVRSRV_ERROR_PROBE_DEFER : PVRSRV_ERROR_INIT_FAILURE)
|
||||
|
||||
PVRSRV_ERROR InitDVFS(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
IMG_DVFS_DEVICE_CFG *psDVFSDeviceCfg = NULL;
|
||||
struct device *psDev;
|
||||
PVRSRV_ERROR eError;
|
||||
int err;
|
||||
|
||||
PVRSRV_VZ_RET_IF_MODE(GUEST, PVRSRV_OK);
|
||||
|
||||
#if !defined(CONFIG_PM_OPP)
|
||||
return PVRSRV_ERROR_NOT_SUPPORTED;
|
||||
#endif
|
||||
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return PVRSRV_ERROR_INVALID_PARAMS;
|
||||
}
|
||||
|
||||
if (psDeviceNode->psDevConfig->sDVFS.sDVFSDevice.bInitPending)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR,
|
||||
"DVFS initialise pending for device node %p",
|
||||
psDeviceNode));
|
||||
return PVRSRV_ERROR_INIT_FAILURE;
|
||||
}
|
||||
|
||||
psDev = psDeviceNode->psDevConfig->pvOSDevice;
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDVFSDeviceCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSDeviceCfg;
|
||||
psDeviceNode->psDevConfig->sDVFS.sDVFSDevice.bInitPending = IMG_TRUE;
|
||||
|
||||
#if defined(SUPPORT_SOC_TIMER)
|
||||
if (! psDeviceNode->psDevConfig->pfnSoCTimerRead)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "System layer SoC timer callback not implemented"));
|
||||
return PVRSRV_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
eError = SORgxGpuUtilStatsRegister(&psDVFSDevice->hGpuUtilUserDVFS);
|
||||
if (eError != PVRSRV_OK)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to register to the GPU utilisation stats, %d", eError));
|
||||
return eError;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
err = dev_pm_opp_of_add_table(psDev);
|
||||
if (err)
|
||||
{
|
||||
/*
|
||||
* If there are no device tree or system layer provided operating points
|
||||
* then return an error
|
||||
*/
|
||||
if (err != -ENODEV || !psDVFSDeviceCfg->pasOPPTable)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to init opp table from devicetree, %d", err));
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (psDVFSDeviceCfg->pasOPPTable)
|
||||
{
|
||||
err = FillOPPTable(psDev, psDeviceNode);
|
||||
if (err)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to fill OPP table with data, %d", err));
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
}
|
||||
|
||||
PVR_TRACE(("PVR DVFS init pending: dev = %p, PVR device = %p",
|
||||
psDev, psDeviceNode));
|
||||
|
||||
return PVRSRV_OK;
|
||||
|
||||
err_exit:
|
||||
DeinitDVFS(psDeviceNode);
|
||||
return eError;
|
||||
}
|
||||
|
||||
PVRSRV_ERROR RegisterDVFSDevice(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
IMG_DVFS_DEVICE_CFG *psDVFSDeviceCfg = NULL;
|
||||
IMG_DVFS_GOVERNOR_CFG *psDVFSGovernorCfg = NULL;
|
||||
RGX_TIMING_INFORMATION *psRGXTimingInfo = NULL;
|
||||
struct device *psDev;
|
||||
unsigned long min_freq = 0, max_freq = 0, min_volt = 0;
|
||||
PVRSRV_ERROR eError;
|
||||
int err;
|
||||
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return PVRSRV_ERROR_INVALID_PARAMS;
|
||||
}
|
||||
|
||||
if (!psDeviceNode->psDevConfig->sDVFS.sDVFSDevice.bInitPending)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR,
|
||||
"DVFS initialise not yet pending for device node %p",
|
||||
psDeviceNode));
|
||||
return PVRSRV_ERROR_INIT_FAILURE;
|
||||
}
|
||||
|
||||
psDev = psDeviceNode->psDevConfig->pvOSDevice;
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDVFSDeviceCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSDeviceCfg;
|
||||
psDVFSGovernorCfg = &psDeviceNode->psDevConfig->sDVFS.sDVFSGovernorCfg;
|
||||
psRGXTimingInfo = ((RGX_DATA *)psDeviceNode->psDevConfig->hDevData)->psRGXTimingInfo;
|
||||
psDeviceNode->psDevConfig->sDVFS.sDVFSDevice.bInitPending = IMG_FALSE;
|
||||
psDeviceNode->psDevConfig->sDVFS.sDVFSDevice.bReady = IMG_TRUE;
|
||||
|
||||
err = GetOPPValues(psDev, &min_freq, &min_volt, &max_freq);
|
||||
if (err)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to read OPP points, %d", err));
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
img_devfreq_dev_profile.initial_freq = min_freq;
|
||||
img_devfreq_dev_profile.polling_ms = psDVFSDeviceCfg->ui32PollMs;
|
||||
|
||||
psRGXTimingInfo->ui32CoreClockSpeed = min_freq;
|
||||
|
||||
psDVFSDeviceCfg->pfnSetFrequency(min_freq);
|
||||
psDVFSDeviceCfg->pfnSetVoltage(min_volt);
|
||||
|
||||
psDVFSDevice->data.upthreshold = psDVFSGovernorCfg->ui32UpThreshold;
|
||||
psDVFSDevice->data.downdifferential = psDVFSGovernorCfg->ui32DownDifferential;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
|
||||
psDVFSDevice->psDevFreq = devm_devfreq_add_device(psDev,
|
||||
&img_devfreq_dev_profile,
|
||||
"simple_ondemand",
|
||||
&psDVFSDevice->data);
|
||||
#else
|
||||
psDVFSDevice->psDevFreq = devfreq_add_device(psDev,
|
||||
&img_devfreq_dev_profile,
|
||||
"simple_ondemand",
|
||||
&psDVFSDevice->data);
|
||||
#endif
|
||||
|
||||
if (IS_ERR(psDVFSDevice->psDevFreq))
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR,
|
||||
"Failed to add as devfreq device %p, %ld",
|
||||
psDVFSDevice->psDevFreq,
|
||||
PTR_ERR(psDVFSDevice->psDevFreq)));
|
||||
eError = TO_IMG_ERR(PTR_ERR(psDVFSDevice->psDevFreq));
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
eError = SuspendDVFS(psDeviceNode);
|
||||
if (eError != PVRSRV_OK)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "PVRSRVInit: Failed to suspend DVFS"));
|
||||
goto err_exit;
|
||||
}
|
||||
err = devfreq_suspend_device(psDVFSDevice->psDevFreq);
|
||||
if (err < 0)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "failed to suspend the devfreq devices"));
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
#if defined(CHROMIUMOS_KERNEL) && (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))
|
||||
psDVFSDevice->psDevFreq->policy.user.min_freq = min_freq;
|
||||
psDVFSDevice->psDevFreq->policy.user.max_freq = max_freq;
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0))
|
||||
psDVFSDevice->psDevFreq->scaling_min_freq = min_freq;
|
||||
psDVFSDevice->psDevFreq->scaling_max_freq = max_freq;
|
||||
#else
|
||||
psDVFSDevice->psDevFreq->min_freq = min_freq;
|
||||
psDVFSDevice->psDevFreq->max_freq = max_freq;
|
||||
#endif
|
||||
|
||||
err = devfreq_register_opp_notifier(psDev, psDVFSDevice->psDevFreq);
|
||||
if (err)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to register opp notifier, %d", err));
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
err = RegisterCoolingDevice(psDev, psDVFSDevice, psDVFSDeviceCfg->psPowerOps);
|
||||
if (err)
|
||||
{
|
||||
eError = TO_IMG_ERR(err);
|
||||
goto err_exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
PVR_TRACE(("PVR DVFS activated: %lu-%lu Hz, Period: %ums",
|
||||
min_freq,
|
||||
max_freq,
|
||||
psDVFSDeviceCfg->ui32PollMs));
|
||||
|
||||
return PVRSRV_OK;
|
||||
|
||||
err_exit:
|
||||
UnregisterDVFSDevice(psDeviceNode);
|
||||
return eError;
|
||||
}
|
||||
|
||||
void UnregisterDVFSDevice(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
struct device *psDev = NULL;
|
||||
IMG_INT32 i32Error;
|
||||
|
||||
/* Check the device exists */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PVRSRV_VZ_RETN_IF_MODE(GUEST);
|
||||
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDev = psDeviceNode->psDevConfig->pvOSDevice;
|
||||
|
||||
if (! psDVFSDevice)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEVFREQ_THERMAL)
|
||||
if (!IS_ERR_OR_NULL(psDVFSDevice->psDevfreqCoolingDevice))
|
||||
{
|
||||
devfreq_cooling_unregister(psDVFSDevice->psDevfreqCoolingDevice);
|
||||
psDVFSDevice->psDevfreqCoolingDevice = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (psDVFSDevice->psDevFreq)
|
||||
{
|
||||
i32Error = devfreq_unregister_opp_notifier(psDev, psDVFSDevice->psDevFreq);
|
||||
if (i32Error < 0)
|
||||
{
|
||||
PVR_DPF((PVR_DBG_ERROR, "Failed to unregister OPP notifier"));
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0))
|
||||
devfreq_remove_device(psDVFSDevice->psDevFreq);
|
||||
#else
|
||||
devm_devfreq_remove_device(psDev, psDVFSDevice->psDevFreq);
|
||||
#endif
|
||||
|
||||
psDVFSDevice->psDevFreq = NULL;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) && \
|
||||
LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
|
||||
kfree(img_devfreq_dev_profile.freq_table);
|
||||
#endif
|
||||
|
||||
psDVFSDevice->bInitPending = IMG_FALSE;
|
||||
psDVFSDevice->bReady = IMG_FALSE;
|
||||
}
|
||||
|
||||
void DeinitDVFS(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
struct device *psDev = NULL;
|
||||
|
||||
/* Check the device exists */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PVRSRV_VZ_RETN_IF_MODE(GUEST);
|
||||
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDev = psDeviceNode->psDevConfig->pvOSDevice;
|
||||
|
||||
/* Remove OPP entries for this device */
|
||||
ClearOPPTable(psDev, psDeviceNode);
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) || \
|
||||
(defined(CHROMIUMOS_KERNEL) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)))
|
||||
dev_pm_opp_of_remove_table(psDev);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SORgxGpuUtilStatsUnregister(psDVFSDevice->hGpuUtilUserDVFS);
|
||||
psDVFSDevice->hGpuUtilUserDVFS = NULL;
|
||||
psDVFSDevice->bInitPending = IMG_FALSE;
|
||||
psDVFSDevice->bReady = IMG_FALSE;
|
||||
}
|
||||
|
||||
PVRSRV_ERROR SuspendDVFS(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
|
||||
/* Check the device is registered */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return PVRSRV_ERROR_INVALID_DEVICE;
|
||||
}
|
||||
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
psDVFSDevice->bEnabled = IMG_FALSE;
|
||||
|
||||
return PVRSRV_OK;
|
||||
}
|
||||
|
||||
PVRSRV_ERROR ResumeDVFS(PPVRSRV_DEVICE_NODE psDeviceNode)
|
||||
{
|
||||
IMG_DVFS_DEVICE *psDVFSDevice = NULL;
|
||||
|
||||
/* Check the device is registered */
|
||||
if (!psDeviceNode)
|
||||
{
|
||||
return PVRSRV_ERROR_INVALID_DEVICE;
|
||||
}
|
||||
|
||||
psDVFSDevice = &psDeviceNode->psDevConfig->sDVFS.sDVFSDevice;
|
||||
|
||||
/* Not supported in GuestOS drivers */
|
||||
psDVFSDevice->bEnabled = !PVRSRV_VZ_MODE_IS(GUEST);
|
||||
|
||||
return PVRSRV_OK;
|
||||
}
|
||||
|
||||
#endif /* !NO_HARDWARE */
|
||||
@@ -1,62 +0,0 @@
|
||||
/*************************************************************************/ /*!
|
||||
@File pvr_dvfs.c
|
||||
@Title System level interface for DVFS
|
||||
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
|
||||
@License Dual MIT/GPLv2
|
||||
|
||||
The contents of this file are subject to the MIT license as set out below.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 2 ("GPL") in which case the provisions
|
||||
of GPL are applicable instead of those above.
|
||||
|
||||
If you wish to allow use of your version of this file only under the terms of
|
||||
GPL, and not to allow others to use your version of this file under the terms
|
||||
of the MIT license, indicate your decision by deleting the provisions above
|
||||
and replace them with the notice and other provisions required by GPL as set
|
||||
out in the file called "GPL-COPYING" included in this distribution. If you do
|
||||
not delete the provisions above, a recipient may use your version of this file
|
||||
under the terms of either the MIT license or GPL.
|
||||
|
||||
This License is also included in this distribution in the file called
|
||||
"MIT-COPYING".
|
||||
|
||||
EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
|
||||
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/ /**************************************************************************/
|
||||
|
||||
#ifndef PVR_DVFS_DEVICE_H
|
||||
#define PVR_DVFS_DEVICE_H
|
||||
|
||||
#include "opaque_types.h"
|
||||
#include "pvrsrv_error.h"
|
||||
|
||||
|
||||
PVRSRV_ERROR InitDVFS(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
void DeinitDVFS(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
PVRSRV_ERROR RegisterDVFSDevice(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
void UnregisterDVFSDevice(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
PVRSRV_ERROR SuspendDVFS(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
PVRSRV_ERROR ResumeDVFS(PPVRSRV_DEVICE_NODE psDeviceNode);
|
||||
|
||||
#endif /* PVR_DVFS_DEVICE_H */
|
||||
@@ -136,8 +136,7 @@ pvrsrvkm-y += \
|
||||
dma_support.o \
|
||||
vmm_type_stub.o \
|
||||
sysconfig.o \
|
||||
thead_sys.o \
|
||||
pvr_dvfs_device.o
|
||||
thead_sys.o
|
||||
pvrsrvkm-$(CONFIG_DRM_POWERVR_ROGUE_DEBUG) += \
|
||||
client_ri_direct_bridge.o \
|
||||
server_ri_bridge.o \
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/*************************************************************************/ /*!
|
||||
@File
|
||||
@Title SO Interface header file for devices/RGX functions
|
||||
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
|
||||
@Description Contains SO interface functions. These functions are defined in
|
||||
the common devices layer and are called from the env layer OS
|
||||
specific implementation.
|
||||
@License Dual MIT/GPLv2
|
||||
|
||||
The contents of this file are subject to the MIT license as set out below.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
the GNU General Public License Version 2 ("GPL") in which case the provisions
|
||||
of GPL are applicable instead of those above.
|
||||
|
||||
If you wish to allow use of your version of this file only under the terms of
|
||||
GPL, and not to allow others to use your version of this file under the terms
|
||||
of the MIT license, indicate your decision by deleting the provisions above
|
||||
and replace them with the notice and other provisions required by GPL as set
|
||||
out in the file called "GPL-COPYING" included in this distribution. If you do
|
||||
not delete the provisions above, a recipient may use your version of this file
|
||||
under the terms of either the MIT license or GPL.
|
||||
|
||||
This License is also included in this distribution in the file called
|
||||
"MIT-COPYING".
|
||||
|
||||
EXCEPT AS OTHERWISE STATED IN A NEGOTIATED AGREEMENT: (A) THE SOFTWARE IS
|
||||
PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT; AND (B) IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/ /**************************************************************************/
|
||||
|
||||
#if !defined(SOFUNC_RGX_H_)
|
||||
#define SOFUNC_RGX_H_
|
||||
|
||||
#include "img_types.h"
|
||||
#include "pvrsrv_error.h"
|
||||
|
||||
|
||||
#if !defined(NO_HARDWARE)
|
||||
/*!
|
||||
*******************************************************************************
|
||||
|
||||
@Function SORgxGpuUtilStatsRegister
|
||||
|
||||
@Description SO Interface function called from the OS layer implementation.
|
||||
Initialise data used to compute GPU utilisation statistics
|
||||
for a particular user (identified by the handle passed as
|
||||
argument). This function must be called only once for each
|
||||
different user/handle.
|
||||
|
||||
@Input phGpuUtilUser - Pointer to handle used to identify a user of
|
||||
RGXGetGpuUtilStats
|
||||
|
||||
@Return PVRSRV_ERROR
|
||||
|
||||
******************************************************************************/
|
||||
PVRSRV_ERROR SORgxGpuUtilStatsRegister(IMG_HANDLE *phGpuUtilUser);
|
||||
|
||||
|
||||
/*!
|
||||
*******************************************************************************
|
||||
|
||||
@Function SORgxGpuUtilStatsUnregister
|
||||
|
||||
@Description SO Interface function called from the OS layer implementation.
|
||||
Free data previously used to compute GPU utilisation statistics
|
||||
for a particular user (identified by the handle passed as
|
||||
argument).
|
||||
|
||||
@Input hGpuUtilUser - Handle used to identify a user of
|
||||
RGXGetGpuUtilStats
|
||||
|
||||
@Return PVRSRV_ERROR
|
||||
|
||||
******************************************************************************/
|
||||
PVRSRV_ERROR SORgxGpuUtilStatsUnregister(IMG_HANDLE hGpuUtilUser);
|
||||
#endif /* !defined(NO_HARDWARE) */
|
||||
|
||||
|
||||
|
||||
#endif /* SOFUNC_RGX_H_ */
|
||||
@@ -193,6 +193,27 @@ static int vs_plane_atomic_get_property(struct drm_plane *plane,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool vs_plane_format_mod_supported(struct drm_plane *plane,
|
||||
uint32_t format,
|
||||
uint64_t modifier)
|
||||
{
|
||||
struct vs_plane *vs_plane = to_vs_plane(plane);
|
||||
int i;
|
||||
|
||||
for(i = 0; i < vs_plane->info->num_modifiers; i++) {
|
||||
if (vs_plane->info->modifiers[i] == modifier)
|
||||
break;
|
||||
}
|
||||
if (i && i == vs_plane->info->num_modifiers)
|
||||
return false;
|
||||
|
||||
for(i = 0; i < vs_plane->info->num_formats; i++) {
|
||||
if (vs_plane->info->formats[i] == format)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const struct drm_plane_funcs vs_plane_funcs = {
|
||||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
@@ -202,6 +223,7 @@ const struct drm_plane_funcs vs_plane_funcs = {
|
||||
.atomic_destroy_state = vs_plane_atomic_destroy_state,
|
||||
.atomic_set_property = vs_plane_atomic_set_property,
|
||||
.atomic_get_property = vs_plane_atomic_get_property,
|
||||
.format_mod_supported = vs_plane_format_mod_supported,
|
||||
};
|
||||
|
||||
static unsigned char vs_get_plane_number(struct drm_framebuffer *fb)
|
||||
@@ -300,6 +322,8 @@ struct vs_plane *vs_plane_create(struct drm_device *drm_dev,
|
||||
if (!plane)
|
||||
return NULL;
|
||||
|
||||
plane->info = info;
|
||||
|
||||
ret = drm_universal_plane_init(drm_dev, &plane->base, possible_crtcs,
|
||||
&vs_plane_funcs, info->formats,
|
||||
info->num_formats, info->modifiers, info->type,
|
||||
|
||||
@@ -47,6 +47,7 @@ struct vs_plane {
|
||||
struct drm_plane base;
|
||||
u8 id;
|
||||
dma_addr_t dma_addr[MAX_NUM_PLANES];
|
||||
struct vs_plane_info *info;
|
||||
|
||||
struct drm_property *degamma_mode;
|
||||
struct drm_property *watermark_prop;
|
||||
|
||||
@@ -2453,6 +2453,5 @@ static void __exit ns_cleanup_module(void)
|
||||
module_exit(ns_cleanup_module);
|
||||
|
||||
MODULE_LICENSE ("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR ("Artem B. Bityuckiy");
|
||||
MODULE_DESCRIPTION ("The NAND flash simulator");
|
||||
|
||||
@@ -1469,4 +1469,3 @@ MODULE_VERSION(__stringify(UBI_VERSION));
|
||||
MODULE_DESCRIPTION("UBI - Unsorted Block Images");
|
||||
MODULE_AUTHOR("Artem Bityutskiy");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -868,6 +868,9 @@ static int __maybe_unused thead_dwmac_resume(struct device *dev)
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
pm_debug(dev,"enter %s()\n",__func__);
|
||||
|
||||
if (!netif_running(ndev))
|
||||
return 0;
|
||||
|
||||
if (priv->plat->init)
|
||||
priv->plat->init(pdev, priv->plat->bsp_priv);
|
||||
|
||||
|
||||
@@ -468,7 +468,6 @@ void rwnx_rx_handle_msg(struct aic_sdio_dev *sdiodev, struct ipc_e2a_msg *msg)
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
#define MD5(x) x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15]
|
||||
|
||||
@@ -7264,7 +7264,6 @@ static void __exit rwnx_mod_exit(void)
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
module_init(rwnx_mod_init);
|
||||
|
||||
@@ -224,7 +224,6 @@ static int rwnx_plat_tl4_fw_upload(struct rwnx_plat *rwnx_plat, u8 *fw_addr,
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -1602,4 +1602,3 @@ module_init(nvmet_init);
|
||||
module_exit(nvmet_exit);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -22,6 +22,12 @@ config LIGHT_REBOOTMODE
|
||||
help
|
||||
This driver supports check rebootmode feature in Light FM platform
|
||||
|
||||
config LIGHT_DDR_PMU
|
||||
tristate "Thead light ddr-pmu support"
|
||||
default m
|
||||
help
|
||||
This driver supports thead-ddr-pmu is a IP module used to do performance monitor
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
obj-$(CONFIG_LIGHT_IOPMP) += light-iopmp.o
|
||||
obj-$(CONFIG_LIGHT_SUSPEND) += pm-light.o
|
||||
obj-$(CONFIG_LIGHT_REBOOTMODE) += light_event.o
|
||||
obj-$(CONFIG_LIGHT_DDR_PMU) += thead-ddr-pmu.o
|
||||
|
||||
1916
drivers/soc/thead/thead-ddr-pmu.c
Normal file
1916
drivers/soc/thead/thead-ddr-pmu.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3652,7 +3652,6 @@ static void __exit target_core_exit_configfs(void)
|
||||
MODULE_DESCRIPTION("Target_Core_Mod/ConfigFS");
|
||||
MODULE_AUTHOR("nab@Linux-iSCSI.org");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
module_init(target_core_init_configfs);
|
||||
module_exit(target_core_exit_configfs);
|
||||
|
||||
@@ -956,7 +956,6 @@ static void __exit fileio_module_exit(void)
|
||||
MODULE_DESCRIPTION("TCM FILEIO subsystem plugin");
|
||||
MODULE_AUTHOR("nab@Linux-iSCSI.org");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
module_init(fileio_module_init);
|
||||
module_exit(fileio_module_exit);
|
||||
|
||||
@@ -3446,7 +3446,6 @@ static struct usb_function *fsg_alloc(struct usb_function_instance *fi)
|
||||
|
||||
DECLARE_USB_FUNCTION_INIT(mass_storage, fsg_alloc_inst, fsg_alloc);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR("Michal Nazarewicz");
|
||||
|
||||
/************************* Module parameters *************************/
|
||||
|
||||
@@ -1015,5 +1015,4 @@ static struct usb_function *f_audio_alloc(struct usb_function_instance *fi)
|
||||
|
||||
DECLARE_USB_FUNCTION_INIT(uac1_legacy, f_audio_alloc_inst, f_audio_alloc);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_AUTHOR("Bryan Wu");
|
||||
|
||||
@@ -520,4 +520,3 @@ ssize_t fsg_store_inquiry_string(struct fsg_lun *curlun, const char *buf,
|
||||
EXPORT_SYMBOL_GPL(fsg_store_inquiry_string);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
|
||||
@@ -738,4 +738,3 @@ MODULE_AUTHOR("Latchesar Ionkov <lucho@ionkov.net>");
|
||||
MODULE_AUTHOR("Eric Van Hensbergen <ericvh@gmail.com>");
|
||||
MODULE_AUTHOR("Ron Minnich <rminnich@lanl.gov>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
# Rewritten to use lists instead of if-statements.
|
||||
#
|
||||
|
||||
subdir-ccflags-y += -DANDROID_GKI_VFS_EXPORT_ONLY=VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
|
||||
|
||||
obj-y := open.o read_write.o file_table.o super.o \
|
||||
char_dev.o stat.o exec.o pipe.o namei.o fcntl.o \
|
||||
ioctl.o readdir.o select.o dcache.o inode.o \
|
||||
|
||||
@@ -492,4 +492,3 @@ static void __exit exit_adfs_fs(void)
|
||||
module_init(init_adfs_fs)
|
||||
module_exit(exit_adfs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -676,7 +676,6 @@ static void __exit exit_affs_fs(void)
|
||||
|
||||
MODULE_DESCRIPTION("Amiga filesystem support for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
module_init(init_affs_fs)
|
||||
module_exit(exit_affs_fs)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
MODULE_DESCRIPTION("AFS Client File System");
|
||||
MODULE_AUTHOR("Red Hat, Inc.");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
unsigned afs_debug;
|
||||
module_param_named(debug, afs_debug, uint, S_IWUSR | S_IRUGO);
|
||||
|
||||
@@ -114,7 +114,7 @@ kill_priv:
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(setattr_prepare, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(setattr_prepare);
|
||||
|
||||
/**
|
||||
* inode_newsize_ok - may this inode be truncated to a given size
|
||||
@@ -158,7 +158,7 @@ out_sig:
|
||||
out_big:
|
||||
return -EFBIG;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(inode_newsize_ok, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(inode_newsize_ok);
|
||||
|
||||
/**
|
||||
* setattr_copy - copy simple metadata updates into the generic inode
|
||||
@@ -345,4 +345,4 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(notify_change, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(notify_change);
|
||||
|
||||
@@ -44,4 +44,3 @@ static void __exit exit_autofs_fs(void)
|
||||
module_init(init_autofs_fs)
|
||||
module_exit(exit_autofs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -207,7 +207,7 @@ void make_bad_inode(struct inode *inode)
|
||||
inode->i_opflags &= ~IOP_XATTR;
|
||||
inode->i_fop = &bad_file_ops;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(make_bad_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(make_bad_inode);
|
||||
|
||||
/*
|
||||
* This tests whether an inode has been flagged as bad. The test uses
|
||||
@@ -227,7 +227,7 @@ bool is_bad_inode(struct inode *inode)
|
||||
return (inode->i_op == &bad_inode_ops);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_NS(is_bad_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(is_bad_inode);
|
||||
|
||||
/**
|
||||
* iget_failed - Mark an under-construction inode as dead and release it
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
MODULE_DESCRIPTION("BeOS File System (BeFS) driver");
|
||||
MODULE_AUTHOR("Will Dyson");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
/* The units the vfs expects inode->i_blocks to be in */
|
||||
#define VFS_BLOCK_SIZE 512
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
MODULE_AUTHOR("Tigran Aivazian <aivazian.tigran@gmail.com>");
|
||||
MODULE_DESCRIPTION("SCO UnixWare BFS filesystem for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
|
||||
@@ -832,4 +832,3 @@ static void __exit exit_misc_binfmt(void)
|
||||
core_initcall(init_misc_binfmt);
|
||||
module_exit(exit_misc_binfmt);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -186,7 +186,7 @@ int sb_set_blocksize(struct super_block *sb, int size)
|
||||
return sb->s_blocksize;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_NS(sb_set_blocksize, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(sb_set_blocksize);
|
||||
|
||||
int sb_min_blocksize(struct super_block *sb, int size)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ int sb_min_blocksize(struct super_block *sb, int size)
|
||||
return sb_set_blocksize(sb, size);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_NS(sb_min_blocksize, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(sb_min_blocksize);
|
||||
|
||||
static int
|
||||
blkdev_get_block(struct inode *inode, sector_t iblock,
|
||||
|
||||
@@ -2597,7 +2597,6 @@ late_initcall(init_btrfs_fs);
|
||||
module_exit(exit_btrfs_fs)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_SOFTDEP("pre: crc32c");
|
||||
MODULE_SOFTDEP("pre: xxhash64");
|
||||
MODULE_SOFTDEP("pre: sha256");
|
||||
|
||||
32
fs/buffer.c
32
fs/buffer.c
@@ -173,7 +173,7 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
|
||||
unlock_buffer(bh);
|
||||
put_bh(bh);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(end_buffer_write_sync, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(end_buffer_write_sync);
|
||||
|
||||
/*
|
||||
* Various filesystems appear to want __find_get_block to be non-blocking.
|
||||
@@ -419,7 +419,7 @@ void mark_buffer_async_write(struct buffer_head *bh)
|
||||
{
|
||||
mark_buffer_async_write_endio(bh, end_buffer_async_write);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mark_buffer_async_write, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mark_buffer_async_write);
|
||||
|
||||
|
||||
/*
|
||||
@@ -674,7 +674,7 @@ int __set_page_dirty_buffers(struct page *page)
|
||||
|
||||
return newly_dirty;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__set_page_dirty_buffers, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__set_page_dirty_buffers);
|
||||
|
||||
/*
|
||||
* Write out and wait upon a list of buffers.
|
||||
@@ -1141,7 +1141,7 @@ void mark_buffer_dirty(struct buffer_head *bh)
|
||||
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mark_buffer_dirty, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mark_buffer_dirty);
|
||||
|
||||
void mark_buffer_write_io_error(struct buffer_head *bh)
|
||||
{
|
||||
@@ -1159,7 +1159,7 @@ void mark_buffer_write_io_error(struct buffer_head *bh)
|
||||
errseq_set(&sb->s_wb_err, -EIO);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mark_buffer_write_io_error, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mark_buffer_write_io_error);
|
||||
|
||||
/*
|
||||
* Decrement a buffer_head's reference count. If all buffers against a page
|
||||
@@ -1176,7 +1176,7 @@ void __brelse(struct buffer_head * buf)
|
||||
}
|
||||
WARN(1, KERN_ERR "VFS: brelse: Trying to free free buffer\n");
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__brelse, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__brelse);
|
||||
|
||||
/*
|
||||
* bforget() is like brelse(), except it discards any
|
||||
@@ -1195,7 +1195,7 @@ void __bforget(struct buffer_head *bh)
|
||||
}
|
||||
__brelse(bh);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__bforget, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__bforget);
|
||||
|
||||
static struct buffer_head *__bread_slow(struct buffer_head *bh)
|
||||
{
|
||||
@@ -1376,7 +1376,7 @@ void __breadahead(struct block_device *bdev, sector_t block, unsigned size)
|
||||
brelse(bh);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__breadahead, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__breadahead);
|
||||
|
||||
void __breadahead_gfp(struct block_device *bdev, sector_t block, unsigned size,
|
||||
gfp_t gfp)
|
||||
@@ -1411,7 +1411,7 @@ __bread_gfp(struct block_device *bdev, sector_t block,
|
||||
bh = __bread_slow(bh);
|
||||
return bh;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__bread_gfp, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__bread_gfp);
|
||||
|
||||
static void __invalidate_bh_lrus(struct bh_lru *b)
|
||||
{
|
||||
@@ -1573,7 +1573,7 @@ void block_invalidatepage(struct page *page, unsigned int offset,
|
||||
out:
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(block_invalidatepage, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(block_invalidatepage);
|
||||
|
||||
|
||||
/*
|
||||
@@ -1609,7 +1609,7 @@ void create_empty_buffers(struct page *page,
|
||||
attach_page_private(page, head);
|
||||
spin_unlock(&page->mapping->private_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(create_empty_buffers, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(create_empty_buffers);
|
||||
|
||||
/**
|
||||
* clean_bdev_aliases: clean a range of buffers in block device
|
||||
@@ -1683,7 +1683,7 @@ unlock_page:
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(clean_bdev_aliases, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(clean_bdev_aliases);
|
||||
|
||||
/*
|
||||
* Size is a power-of-two in the range 512..PAGE_SIZE,
|
||||
@@ -1941,7 +1941,7 @@ void page_zero_new_buffers(struct page *page, unsigned from, unsigned to)
|
||||
bh = bh->b_this_page;
|
||||
} while (bh != head);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(page_zero_new_buffers, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(page_zero_new_buffers);
|
||||
|
||||
static void
|
||||
iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh,
|
||||
@@ -2275,7 +2275,7 @@ int block_is_partially_uptodate(struct page *page, unsigned long from,
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(block_is_partially_uptodate, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(block_is_partially_uptodate);
|
||||
|
||||
/*
|
||||
* Generic "read page" function for block devices that have the normal
|
||||
@@ -3142,7 +3142,7 @@ void ll_rw_block(int op, int op_flags, int nr, struct buffer_head *bhs[])
|
||||
unlock_buffer(bh);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(ll_rw_block, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(ll_rw_block);
|
||||
|
||||
void write_dirty_buffer(struct buffer_head *bh, int op_flags)
|
||||
{
|
||||
@@ -3195,7 +3195,7 @@ int sync_dirty_buffer(struct buffer_head *bh)
|
||||
{
|
||||
return __sync_dirty_buffer(bh, REQ_SYNC);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(sync_dirty_buffer, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(sync_dirty_buffer);
|
||||
|
||||
/*
|
||||
* try_to_free_buffers() checks if all the buffers on this particular page
|
||||
|
||||
@@ -28,7 +28,6 @@ MODULE_PARM_DESC(cachefiles_debug, "CacheFiles debugging mask");
|
||||
MODULE_DESCRIPTION("Mounted-filesystem based cache");
|
||||
MODULE_AUTHOR("Red Hat, Inc.");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
struct kmem_cache *cachefiles_object_jar;
|
||||
|
||||
|
||||
@@ -1335,4 +1335,3 @@ MODULE_AUTHOR("Yehuda Sadeh <yehuda@hq.newdream.net>");
|
||||
MODULE_AUTHOR("Patience Warnick <patience@newdream.net>");
|
||||
MODULE_DESCRIPTION("Ceph filesystem for Linux");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -1693,7 +1693,6 @@ exit_cifs(void)
|
||||
|
||||
MODULE_AUTHOR("Steve French");
|
||||
MODULE_LICENSE("GPL"); /* combination of LGPL + GPL source behaves as GPL */
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_DESCRIPTION
|
||||
("VFS to access SMB3 servers e.g. Samba, Macs, Azure and Windows (and "
|
||||
"also older servers complying with the SNIA CIFS Specification)");
|
||||
|
||||
@@ -388,7 +388,6 @@ MODULE_AUTHOR("Jan Harkes, Peter J. Braam");
|
||||
MODULE_DESCRIPTION("Coda Distributed File System VFS interface");
|
||||
MODULE_ALIAS_CHARDEV_MAJOR(CODA_PSDEV_MAJOR);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_VERSION("7.0");
|
||||
|
||||
static int __init init_coda(void)
|
||||
|
||||
@@ -173,7 +173,6 @@ static void __exit configfs_exit(void)
|
||||
|
||||
MODULE_AUTHOR("Oracle");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
MODULE_VERSION("0.0.2");
|
||||
MODULE_DESCRIPTION("Simple RAM filesystem for user driven kernel subsystem configuration.");
|
||||
|
||||
|
||||
@@ -1010,4 +1010,3 @@ static void __exit exit_cramfs_fs(void)
|
||||
module_init(init_cramfs_fs)
|
||||
module_exit(exit_cramfs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_FS_ENCRYPTION) += fscrypto.o
|
||||
|
||||
ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=ANDROID_GKI_VFS_EXPORT_ONLY
|
||||
|
||||
fscrypto-y := crypto.o \
|
||||
fname.o \
|
||||
|
||||
@@ -2110,7 +2110,7 @@ struct dentry *d_obtain_alias(struct inode *inode)
|
||||
{
|
||||
return __d_obtain_alias(inode, true);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(d_obtain_alias, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(d_obtain_alias);
|
||||
|
||||
/**
|
||||
* d_obtain_root - find or allocate a dentry for a given inode
|
||||
@@ -2184,7 +2184,7 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode,
|
||||
}
|
||||
return found;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(d_add_ci, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(d_add_ci);
|
||||
|
||||
|
||||
static inline bool d_same_name(const struct dentry *dentry,
|
||||
@@ -3065,7 +3065,7 @@ out:
|
||||
__d_add(dentry, inode);
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(d_splice_alias, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(d_splice_alias);
|
||||
|
||||
/*
|
||||
* Test whether new_dentry is a subdirectory of old_dentry.
|
||||
|
||||
@@ -1380,7 +1380,7 @@ ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
|
||||
end_io, submit_io, flags);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_NS(__blockdev_direct_IO, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__blockdev_direct_IO);
|
||||
|
||||
static __init int dio_init(void)
|
||||
{
|
||||
|
||||
@@ -891,7 +891,6 @@ MODULE_AUTHOR("Michael A. Halcrow <mhalcrow@us.ibm.com>");
|
||||
MODULE_DESCRIPTION("eCryptfs");
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
module_init(ecryptfs_init)
|
||||
module_exit(ecryptfs_exit)
|
||||
|
||||
@@ -272,7 +272,6 @@ static __exit void efivarfs_exit(void)
|
||||
MODULE_AUTHOR("Matthew Garrett, Jeremy Kerr");
|
||||
MODULE_DESCRIPTION("EFI Variable Filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_ALIAS_FS("efivarfs");
|
||||
|
||||
module_init(efivarfs_init);
|
||||
|
||||
@@ -311,4 +311,3 @@ efs_block_t efs_map_block(struct inode *inode, efs_block_t block) {
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -752,5 +752,4 @@ module_exit(erofs_module_exit);
|
||||
MODULE_DESCRIPTION("Enhanced ROM File System");
|
||||
MODULE_AUTHOR("Gao Xiang, Chao Yu, Miao Xie, CONSUMER BG, HUAWEI Inc.");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
|
||||
@@ -836,6 +836,5 @@ module_exit(exit_exfat_fs);
|
||||
|
||||
MODULE_ALIAS_FS("exfat");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_DESCRIPTION("exFAT filesystem support");
|
||||
MODULE_AUTHOR("Samsung Electronics Co., Ltd.");
|
||||
|
||||
@@ -1654,6 +1654,5 @@ static void __exit exit_ext2_fs(void)
|
||||
MODULE_AUTHOR("Remy Card and others");
|
||||
MODULE_DESCRIPTION("Second Extended Filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
module_init(init_ext2_fs)
|
||||
module_exit(exit_ext2_fs)
|
||||
|
||||
@@ -6770,7 +6770,6 @@ static void __exit ext4_exit_fs(void)
|
||||
MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
|
||||
MODULE_DESCRIPTION("Fourth Extended Filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_SOFTDEP("pre: crc32c");
|
||||
module_init(ext4_init_fs)
|
||||
module_exit(ext4_exit_fs)
|
||||
|
||||
@@ -4487,6 +4487,5 @@ module_exit(exit_f2fs_fs)
|
||||
MODULE_AUTHOR("Samsung Electronics's Praesto Team");
|
||||
MODULE_DESCRIPTION("Flash Friendly File System");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_SOFTDEP("pre: crc32");
|
||||
|
||||
|
||||
@@ -1979,4 +1979,3 @@ module_init(init_fat_fs)
|
||||
module_exit(exit_fat_fs)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -680,7 +680,6 @@ static void __exit exit_msdos_fs(void)
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_AUTHOR("Werner Almesberger");
|
||||
MODULE_DESCRIPTION("MS-DOS filesystem support");
|
||||
|
||||
|
||||
@@ -1077,7 +1077,6 @@ static void __exit exit_vfat_fs(void)
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_DESCRIPTION("VFAT filesystem support");
|
||||
MODULE_AUTHOR("Gordon Chaffee");
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
MODULE_AUTHOR("Christoph Hellwig, Krzysztof Blaszkowski");
|
||||
MODULE_DESCRIPTION("Veritas Filesystem (VxFS) driver");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static struct kmem_cache *vxfs_inode_cachep;
|
||||
|
||||
|
||||
@@ -2338,7 +2338,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
|
||||
out_unlock_inode:
|
||||
spin_unlock(&inode->i_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__mark_inode_dirty, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__mark_inode_dirty);
|
||||
|
||||
/*
|
||||
* The @s_sync_lock is used to serialise concurrent sync operations
|
||||
@@ -2504,7 +2504,7 @@ void try_to_writeback_inodes_sb(struct super_block *sb, enum wb_reason reason)
|
||||
__writeback_inodes_sb_nr(sb, get_nr_dirty_pages(), reason, true);
|
||||
up_read(&sb->s_umount);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(try_to_writeback_inodes_sb, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(try_to_writeback_inodes_sb);
|
||||
|
||||
/**
|
||||
* sync_inodes_sb - sync sb inode pages
|
||||
@@ -2571,7 +2571,7 @@ int write_inode_now(struct inode *inode, int sync)
|
||||
might_sleep();
|
||||
return writeback_single_inode(inode, &wbc);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(write_inode_now, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(write_inode_now);
|
||||
|
||||
/**
|
||||
* sync_inode - write an inode and its pages to disk.
|
||||
@@ -2608,4 +2608,4 @@ int sync_inode_metadata(struct inode *inode, int wait)
|
||||
|
||||
return sync_inode(inode, &wbc);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(sync_inode_metadata, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(sync_inode_metadata);
|
||||
|
||||
@@ -41,7 +41,7 @@ unsigned char fs_ftype_to_dtype(unsigned int filetype)
|
||||
|
||||
return fs_dtype_by_ftype[filetype];
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(fs_ftype_to_dtype, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL_GPL(fs_ftype_to_dtype);
|
||||
|
||||
/*
|
||||
* dirent file type to fs on-disk file type conversion
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# Makefile for general filesystem caching code
|
||||
#
|
||||
|
||||
ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=ANDROID_GKI_VFS_EXPORT_ONLY
|
||||
|
||||
fscache-y := \
|
||||
cache.o \
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
MODULE_AUTHOR("Miklos Szeredi <miklos@szeredi.hu>");
|
||||
MODULE_DESCRIPTION("Filesystem in Userspace");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static struct kmem_cache *fuse_inode_cachep;
|
||||
struct list_head fuse_conn_list;
|
||||
|
||||
@@ -260,7 +260,6 @@ static void __exit exit_gfs2_fs(void)
|
||||
MODULE_DESCRIPTION("Global File System");
|
||||
MODULE_AUTHOR("Red Hat, Inc.");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
module_init(init_gfs2_fs);
|
||||
module_exit(exit_gfs2_fs);
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
static struct kmem_cache *hfs_inode_cachep;
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static int hfs_sync_fs(struct super_block *sb, int wait)
|
||||
{
|
||||
|
||||
@@ -617,7 +617,6 @@ out:
|
||||
MODULE_AUTHOR("Brad Boyer");
|
||||
MODULE_DESCRIPTION("Extended Macintosh Filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static struct kmem_cache *hfsplus_inode_cachep;
|
||||
|
||||
|
||||
@@ -791,4 +791,3 @@ static void __exit exit_hpfs_fs(void)
|
||||
module_init(init_hpfs_fs)
|
||||
module_exit(exit_hpfs_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -44,6 +44,5 @@ module_init(init_incfs_module);
|
||||
module_exit(cleanup_incfs_module);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_AUTHOR("Eugene Zemtsov <ezemtsov@google.com>");
|
||||
MODULE_DESCRIPTION("Incremental File System");
|
||||
|
||||
36
fs/inode.c
36
fs/inode.c
@@ -307,7 +307,7 @@ void drop_nlink(struct inode *inode)
|
||||
if (!inode->i_nlink)
|
||||
atomic_long_inc(&inode->i_sb->s_remove_count);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(drop_nlink, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(drop_nlink);
|
||||
|
||||
/**
|
||||
* clear_nlink - directly zero an inode's link count
|
||||
@@ -346,7 +346,7 @@ void set_nlink(struct inode *inode, unsigned int nlink)
|
||||
inode->__i_nlink = nlink;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_NS(set_nlink, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(set_nlink);
|
||||
|
||||
/**
|
||||
* inc_nlink - directly increment an inode's link count
|
||||
@@ -399,7 +399,7 @@ void inode_init_once(struct inode *inode)
|
||||
__address_space_init_once(&inode->i_data);
|
||||
i_size_ordered_init(inode);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(inode_init_once, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(inode_init_once);
|
||||
|
||||
static void init_once(void *foo)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ void ihold(struct inode *inode)
|
||||
{
|
||||
WARN_ON(atomic_inc_return(&inode->i_count) < 2);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(ihold, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(ihold);
|
||||
|
||||
static void inode_lru_list_add(struct inode *inode)
|
||||
{
|
||||
@@ -503,7 +503,7 @@ void __insert_inode_hash(struct inode *inode, unsigned long hashval)
|
||||
spin_unlock(&inode->i_lock);
|
||||
spin_unlock(&inode_hash_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__insert_inode_hash, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__insert_inode_hash);
|
||||
|
||||
/**
|
||||
* __remove_inode_hash - remove an inode from the hash
|
||||
@@ -519,7 +519,7 @@ void __remove_inode_hash(struct inode *inode)
|
||||
spin_unlock(&inode->i_lock);
|
||||
spin_unlock(&inode_hash_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(__remove_inode_hash, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(__remove_inode_hash);
|
||||
|
||||
void clear_inode(struct inode *inode)
|
||||
{
|
||||
@@ -539,7 +539,7 @@ void clear_inode(struct inode *inode)
|
||||
/* don't need i_lock here, no concurrent mods to i_state */
|
||||
inode->i_state = I_FREEING | I_CLEAR;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(clear_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(clear_inode);
|
||||
|
||||
/*
|
||||
* Free the inode passed in, removing it from the lists it is still connected
|
||||
@@ -1001,7 +1001,7 @@ void unlock_new_inode(struct inode *inode)
|
||||
wake_up_bit(&inode->i_state, __I_NEW);
|
||||
spin_unlock(&inode->i_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(unlock_new_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(unlock_new_inode);
|
||||
|
||||
void discard_new_inode(struct inode *inode)
|
||||
{
|
||||
@@ -1158,7 +1158,7 @@ struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
|
||||
}
|
||||
return inode;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(iget5_locked, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(iget5_locked);
|
||||
|
||||
/**
|
||||
* iget_locked - obtain an inode from a mounted file system
|
||||
@@ -1290,7 +1290,7 @@ ino_t iunique(struct super_block *sb, ino_t max_reserved)
|
||||
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(iunique, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(iunique);
|
||||
|
||||
struct inode *igrab(struct inode *inode)
|
||||
{
|
||||
@@ -1373,7 +1373,7 @@ again:
|
||||
}
|
||||
return inode;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(ilookup5, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(ilookup5);
|
||||
|
||||
/**
|
||||
* ilookup - search for an inode in the inode cache
|
||||
@@ -1853,7 +1853,7 @@ void touch_atime(const struct path *path)
|
||||
skip_update:
|
||||
sb_end_write(inode->i_sb);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(touch_atime, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(touch_atime);
|
||||
|
||||
/*
|
||||
* The logic we want is
|
||||
@@ -1949,7 +1949,7 @@ int file_remove_privs(struct file *file)
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(file_remove_privs, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(file_remove_privs);
|
||||
|
||||
/**
|
||||
* file_update_time - update mtime and ctime time
|
||||
@@ -2130,7 +2130,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
|
||||
" inode %s:%lu\n", mode, inode->i_sb->s_id,
|
||||
inode->i_ino);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(init_special_inode, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(init_special_inode);
|
||||
|
||||
/**
|
||||
* inode_init_owner - Init uid,gid,mode for new inode according to posix standards
|
||||
@@ -2156,7 +2156,7 @@ void inode_init_owner(struct inode *inode, const struct inode *dir,
|
||||
inode->i_gid = current_fsgid();
|
||||
inode->i_mode = mode;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(inode_init_owner, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(inode_init_owner);
|
||||
|
||||
/**
|
||||
* inode_owner_or_capable - check current task permissions to inode
|
||||
@@ -2210,7 +2210,7 @@ void inode_dio_wait(struct inode *inode)
|
||||
if (atomic_read(&inode->i_dio_count))
|
||||
__inode_dio_wait(inode);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(inode_dio_wait, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(inode_dio_wait);
|
||||
|
||||
/*
|
||||
* inode_set_flags - atomically set some inode flags
|
||||
@@ -2234,7 +2234,7 @@ void inode_set_flags(struct inode *inode, unsigned int flags,
|
||||
WARN_ON_ONCE(flags & ~mask);
|
||||
set_mask_bits(&inode->i_flags, mask, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(inode_set_flags, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(inode_set_flags);
|
||||
|
||||
void inode_nohighmem(struct inode *inode)
|
||||
{
|
||||
@@ -2271,7 +2271,7 @@ struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode)
|
||||
WARN(1, "invalid file time granularity: %u", gran);
|
||||
return t;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(timestamp_truncate, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(timestamp_truncate);
|
||||
|
||||
/**
|
||||
* current_time - Return FS time
|
||||
|
||||
@@ -146,7 +146,7 @@ int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical,
|
||||
return 1;
|
||||
return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(fiemap_fill_next_extent, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(fiemap_fill_next_extent);
|
||||
|
||||
/**
|
||||
* fiemap_prep - check validity of requested flags for fiemap
|
||||
@@ -191,7 +191,7 @@ int fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo,
|
||||
ret = filemap_write_and_wait(inode->i_mapping);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(fiemap_prep, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(fiemap_prep);
|
||||
|
||||
static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap)
|
||||
{
|
||||
|
||||
@@ -1612,4 +1612,3 @@ static void __exit exit_iso9660_fs(void)
|
||||
module_init(init_iso9660_fs)
|
||||
module_exit(exit_iso9660_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# Makefile for the linux journaling routines.
|
||||
#
|
||||
|
||||
ccflags-y += -DDEFAULT_SYMBOL_NAMESPACE=ANDROID_GKI_VFS_EXPORT_ONLY
|
||||
|
||||
obj-$(CONFIG_JBD2) += jbd2.o
|
||||
|
||||
|
||||
@@ -3014,7 +3014,6 @@ static void __exit journal_exit(void)
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
module_init(journal_init);
|
||||
module_exit(journal_exit);
|
||||
|
||||
|
||||
@@ -439,4 +439,3 @@ MODULE_DESCRIPTION("The Journalling Flash File System, v2");
|
||||
MODULE_AUTHOR("Red Hat, Inc.");
|
||||
MODULE_LICENSE("GPL"); // Actually dual-licensed, but it doesn't matter for
|
||||
// the sake of this tag. It's Free Software.
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
MODULE_DESCRIPTION("The Journaled Filesystem (JFS)");
|
||||
MODULE_AUTHOR("Steve Best/Dave Kleikamp/Barry Arndt, IBM");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static struct kmem_cache *jfs_inode_cachep;
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t
|
||||
{
|
||||
return -EISDIR;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(generic_read_dir, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(generic_read_dir);
|
||||
|
||||
const struct file_operations simple_dir_operations = {
|
||||
.open = dcache_dir_open,
|
||||
|
||||
@@ -720,5 +720,4 @@ static void __exit exit_minix_fs(void)
|
||||
module_init(init_minix_fs)
|
||||
module_exit(exit_minix_fs)
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@ void mpage_readahead(struct readahead_control *rac, get_block_t get_block)
|
||||
if (args.bio)
|
||||
mpage_bio_submit(REQ_OP_READ, REQ_RAHEAD, args.bio);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mpage_readahead, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mpage_readahead);
|
||||
|
||||
/*
|
||||
* This isn't called much at all
|
||||
@@ -448,7 +448,7 @@ int mpage_readpage(struct page *page, get_block_t get_block)
|
||||
mpage_bio_submit(REQ_OP_READ, 0, args.bio);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mpage_readpage, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mpage_readpage);
|
||||
|
||||
/*
|
||||
* Writing is not so simple.
|
||||
|
||||
12
fs/namei.c
12
fs/namei.c
@@ -2887,7 +2887,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
|
||||
fsnotify_create(dir, dentry);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_create, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_create);
|
||||
|
||||
int vfs_mkobj(struct dentry *dentry, umode_t mode,
|
||||
int (*f)(struct dentry *, umode_t, void *),
|
||||
@@ -3727,7 +3727,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
|
||||
fsnotify_mkdir(dir, dentry);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_mkdir, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_mkdir);
|
||||
|
||||
static long do_mkdirat(int dfd, const char __user *pathname, umode_t mode)
|
||||
{
|
||||
@@ -3801,7 +3801,7 @@ out:
|
||||
d_delete_notify(dir, dentry);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_rmdir, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_rmdir);
|
||||
|
||||
long do_rmdir(int dfd, struct filename *name)
|
||||
{
|
||||
@@ -3924,7 +3924,7 @@ out:
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_unlink, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_unlink);
|
||||
|
||||
/*
|
||||
* Make sure that the actual truncation of the file will occur outside its
|
||||
@@ -4159,7 +4159,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
|
||||
fsnotify_link(dir, inode, new_dentry);
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_link, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_link);
|
||||
|
||||
/*
|
||||
* Hardlinks are often used in delicate situations. We avoid
|
||||
@@ -4419,7 +4419,7 @@ out:
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_NS(vfs_rename, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(vfs_rename);
|
||||
|
||||
static int do_renameat2(int olddfd, const char __user *oldname, int newdfd,
|
||||
const char __user *newname, unsigned int flags)
|
||||
|
||||
@@ -415,7 +415,7 @@ int mnt_want_write_file(struct file *file)
|
||||
sb_end_write(file_inode(file)->i_sb);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(mnt_want_write_file, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL_GPL(mnt_want_write_file);
|
||||
|
||||
/**
|
||||
* __mnt_drop_write - give up write access to a mount
|
||||
@@ -457,7 +457,7 @@ void mnt_drop_write_file(struct file *file)
|
||||
__mnt_drop_write_file(file);
|
||||
sb_end_write(file_inode(file)->i_sb);
|
||||
}
|
||||
EXPORT_SYMBOL_NS(mnt_drop_write_file, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(mnt_drop_write_file);
|
||||
|
||||
static int mnt_make_readonly(struct mount *mnt)
|
||||
{
|
||||
|
||||
@@ -2336,7 +2336,6 @@ static void __exit exit_nfs_fs(void)
|
||||
/* Not quite true; I just maintain it */
|
||||
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
module_param(enable_ino64, bool, 0644);
|
||||
|
||||
module_init(init_nfs_fs)
|
||||
|
||||
@@ -309,7 +309,6 @@ static void __exit exit_nfs_v4(void)
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
module_init(init_nfs_v4);
|
||||
module_exit(exit_nfs_v4);
|
||||
|
||||
@@ -1584,6 +1584,5 @@ static void __exit exit_nfsd(void)
|
||||
|
||||
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
module_init(init_nfsd)
|
||||
module_exit(exit_nfsd)
|
||||
|
||||
@@ -53,7 +53,6 @@ MODULE_AUTHOR("NTT Corp.");
|
||||
MODULE_DESCRIPTION("A New Implementation of the Log-structured Filesystem "
|
||||
"(NILFS)");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
static struct kmem_cache *nilfs_inode_cachep;
|
||||
struct kmem_cache *nilfs_transaction_cachep;
|
||||
|
||||
@@ -541,8 +541,8 @@ struct nls_table *load_nls_default(void)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(unregister_nls);
|
||||
EXPORT_SYMBOL_NS(unload_nls, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL_NS(load_nls, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL_NS(load_nls_default, ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
EXPORT_SYMBOL(unload_nls);
|
||||
EXPORT_SYMBOL(load_nls);
|
||||
EXPORT_SYMBOL(load_nls_default);
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
@@ -578,4 +578,3 @@ module_init(init_nls_euc_jp)
|
||||
module_exit(exit_nls_euc_jp)
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -80,4 +80,3 @@ module_init(init_nls_koi8_ru)
|
||||
module_exit(exit_nls_koi8_ru)
|
||||
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
|
||||
@@ -3186,7 +3186,6 @@ MODULE_AUTHOR("Anton Altaparmakov <anton@tuxera.com>");
|
||||
MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2014 Anton Altaparmakov and Tuxera Inc.");
|
||||
MODULE_VERSION(NTFS_VERSION);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
#ifdef DEBUG
|
||||
module_param(debug_msgs, bint, 0);
|
||||
MODULE_PARM_DESC(debug_msgs, "Enable debug messages.");
|
||||
|
||||
@@ -615,7 +615,6 @@ static void __exit exit_dlmfs_fs(void)
|
||||
|
||||
MODULE_AUTHOR("Oracle");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
|
||||
MODULE_DESCRIPTION("OCFS2 DLM-Filesystem");
|
||||
|
||||
module_init(init_dlmfs_fs)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user