Restore upstream files

Restore the following files to android-mainline commit 561eb836a3
("ANDROID: Temporarily disable XFRM_USER_COMPAT filtering"):
 - arch/arm64/include/asm/io.h
 - arch/arm64/net/bpf_jit_comp.c
 - block/bio.c
 - drivers/pci/of.c
 - drivers/power/reset/hisi-reboot.c
 - include/asm-generic/int-ll64.h
 - include/linux/hdmi.h
 - include/trace/events/cpuhp.h
 - kernel/rcu/tree_stall.h
 - lib/devres.c
 - net/core/skbuff.c

Change-Id: Ifa0c3e6ea783abe4663fb5d3312f00e18fc662ba
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Elliot Berman 2020-12-15 09:50:03 -08:00
parent 972d747aa2
commit dc6af65623
12 changed files with 8 additions and 132 deletions

View File

@ -168,7 +168,6 @@ extern void iounmap(volatile void __iomem *addr);
extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
#define ioremap(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
#define ioremap_nocache(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE))
#define ioremap_wc(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_NC))
/*

View File

@ -1133,14 +1133,3 @@ void bpf_jit_free_exec(void *addr)
{
return vfree(addr);
}
#ifdef CONFIG_CFI_CLANG
bool arch_bpf_jit_check_func(const struct bpf_prog *prog)
{
const uintptr_t func = (const uintptr_t)prog->bpf_func;
/* bpf_func must be correctly aligned and within the BPF JIT region */
return (func >= BPF_JIT_REGION_START && func < BPF_JIT_REGION_END &&
IS_ALIGNED(func, sizeof(u32)));
}
#endif

View File

@ -244,9 +244,6 @@ void bio_uninit(struct bio *bio)
bio_integrity_free(bio);
bio_crypt_free_ctx(bio);
if (bio_integrity(bio))
bio_integrity_free(bio);
}
EXPORT_SYMBOL(bio_uninit);

View File

@ -236,7 +236,6 @@ void of_pci_check_probe_only(void)
}
EXPORT_SYMBOL_GPL(of_pci_check_probe_only);
#if defined(CONFIG_OF_ADDRESS)
/**
* devm_of_pci_get_host_bridge_resources() - Resource-managed parsing of PCI
* host bridge resources from DT
@ -392,7 +391,6 @@ static int devm_of_pci_get_host_bridge_resources(struct device *dev,
pci_free_resource_list(resources);
return err;
}
#endif /* CONFIG_OF_ADDRESS */
#if IS_ENABLED(CONFIG_OF_IRQ)
/**

View File

@ -8,64 +8,26 @@
* Author: Haojian Zhuang <haojian.zhuang@linaro.org>
*/
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mfd/syscon.h>
#include <linux/notifier.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <asm/system_misc.h>
#include <asm/proc-fns.h>
static void __iomem *base;
static u32 reboot_offset;
static struct regmap *pmu_regmap;
static struct regmap *sctrl_regmap;
#define REBOOT_REASON_BOOTLOADER (0x01)
#define REBOOT_REASON_COLDBOOT (0x00)
#define DDR_BYPASS BIT(31)
#define RST_FLAG_MASK GENMASK(7, 0)
#define PMU_HRST_OFFSET ((0x101) << 2)
#define SCPEREN1_OFFSET (0x170)
static int hisi_restart_handler(struct notifier_block *this,
unsigned long mode, void *cmd)
{
int ret;
char reboot_reason;
if (!cmd || !strcmp(cmd, "bootloader"))
reboot_reason = REBOOT_REASON_BOOTLOADER;
else
reboot_reason = REBOOT_REASON_COLDBOOT;
if (base) {
writel_relaxed(0xdeadbeef, base + reboot_offset);
} else {
ret = regmap_update_bits(pmu_regmap, PMU_HRST_OFFSET,
RST_FLAG_MASK, reboot_reason);
if (ret)
return ret;
ret = regmap_write(sctrl_regmap, SCPEREN1_OFFSET, DDR_BYPASS);
if (ret)
return ret;
ret = regmap_write(sctrl_regmap, reboot_offset, 0xdeadbeef);
if (ret)
return ret;
}
writel_relaxed(0xdeadbeef, base + reboot_offset);
while (1)
mdelay(1);
cpu_do_idle();
return NOTIFY_DONE;
}
@ -82,17 +44,8 @@ static int hisi_reboot_probe(struct platform_device *pdev)
base = of_iomap(np, 0);
if (!base) {
pmu_regmap = syscon_regmap_lookup_by_phandle(np, "pmu-regmap");
if (!pmu_regmap) {
WARN(1, "failed to regmap pmu address");
return -ENODEV;
}
sctrl_regmap = syscon_regmap_lookup_by_phandle(np, "sctrl-regmap");
if (!sctrl_regmap) {
WARN(1, "failed to regmap sctrl address");
return -ENODEV;
}
WARN(1, "failed to map base address");
return -ENODEV;
}
if (of_property_read_u32(np, "reboot-offset", &reboot_offset) < 0) {
@ -113,7 +66,6 @@ static int hisi_reboot_probe(struct platform_device *pdev)
static const struct of_device_id hisi_reboot_of_match[] = {
{ .compatible = "hisilicon,sysctrl" },
{ .compatible = "hisilicon,hi3660-reboot" },
{}
};
@ -125,6 +77,3 @@ static struct platform_driver hisi_reboot_driver = {
},
};
module_platform_driver(hisi_reboot_driver);
MODULE_DESCRIPTION("Reset driver for HiSi SoCs");
MODULE_LICENSE("GPL v2");

View File

@ -13,7 +13,7 @@
#ifndef __ASSEMBLY__
typedef __s8 s8;
typedef __s8 s8;
typedef __u8 u8;
typedef __s16 s16;
typedef __u16 u16;

View File

@ -156,7 +156,7 @@ enum hdmi_content_type {
};
enum hdmi_metadata_type {
HDMI_STATIC_METADATA_TYPE1 = 0,
HDMI_STATIC_METADATA_TYPE1 = 1,
};
enum hdmi_eotf {

View File

@ -6,7 +6,6 @@
#define _TRACE_CPUHP_H
#include <linux/tracepoint.h>
#include <linux/sched/clock.h>
TRACE_EVENT(cpuhp_enter,
@ -90,34 +89,6 @@ TRACE_EVENT(cpuhp_exit,
__entry->cpu, __entry->state, __entry->idx, __entry->ret)
);
TRACE_EVENT(cpuhp_latency,
TP_PROTO(unsigned int cpu, unsigned int state,
u64 start_time, int ret),
TP_ARGS(cpu, state, start_time, ret),
TP_STRUCT__entry(
__field(unsigned int, cpu)
__field(unsigned int, state)
__field(u64, time)
__field(int, ret)
),
TP_fast_assign(
__entry->cpu = cpu;
__entry->state = state;
__entry->time = div64_u64(sched_clock() - start_time, 1000);
__entry->ret = ret;
),
TP_printk(" cpu:%d state:%s latency:%llu USEC ret: %d",
__entry->cpu, __entry->state ? "online" : "offline",
__entry->time, __entry->ret)
);
#endif
/* This part must be outside protection */

View File

@ -997,7 +997,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
{
struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
int prev_state, ret = 0;
u64 start_time = 0;
if (num_online_cpus() == 1)
return -EBUSY;
@ -1011,8 +1010,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
#endif
cpus_write_lock();
if (trace_cpuhp_latency_enabled())
start_time = sched_clock();
cpuhp_tasks_frozen = tasks_frozen;
@ -1051,7 +1048,6 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
}
out:
trace_cpuhp_latency(cpu, 0, start_time, ret);
cpus_write_unlock();
/*
* Do post unplug cleanup. This is still protected against
@ -1237,11 +1233,8 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
struct task_struct *idle;
int ret = 0;
u64 start_time = 0;
cpus_write_lock();
if (trace_cpuhp_latency_enabled())
start_time = sched_clock();
if (!cpu_present(cpu)) {
ret = -EINVAL;
@ -1289,7 +1282,6 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
target = min((int)target, CPUHP_BRINGUP_CPU);
ret = cpuhp_up_callbacks(cpu, st, target);
out:
trace_cpuhp_latency(cpu, 1, start_time, ret);
cpus_write_unlock();
arch_smt_update();
return ret;

View File

@ -12,7 +12,7 @@
// Controlling CPU stall warnings, including delay calculation.
/* panic() on RCU Stall sysctl. */
int sysctl_panic_on_rcu_stall __read_mostly = CONFIG_RCU_PANIC_ON_STALL;
int sysctl_panic_on_rcu_stall __read_mostly;
#ifdef CONFIG_PROVE_RCU
#define RCU_STALL_DELAY_DELTA (5 * HZ)

View File

@ -9,7 +9,6 @@
enum devm_ioremap_type {
DEVM_IOREMAP = 0,
DEVM_IOREMAP_UC,
DEVM_IOREMAP_NC,
DEVM_IOREMAP_WC,
};
@ -40,9 +39,6 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
case DEVM_IOREMAP_UC:
addr = ioremap_uc(offset, size);
break;
case DEVM_IOREMAP_NC:
addr = ioremap_nocache(offset, size);
break;
case DEVM_IOREMAP_WC:
addr = ioremap_wc(offset, size);
break;
@ -157,21 +153,6 @@ __devm_ioremap_resource(struct device *dev, const struct resource *res,
return dest_ptr;
}
/**
* cache - Managed ioremap_nocache()
* @dev: Generic device to remap IO address for
* @offset: Resource address to map
* @size: Size of map
*
* Managed ioremap_nocache(). Map is automatically unmapped on driver
* detach.
*/
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
resource_size_t size)
{
return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_NC);
}
/**
* devm_ioremap_resource() - check, request region, and ioremap resource
* @dev: generic device to handle the resource for

View File

@ -5697,7 +5697,7 @@ EXPORT_SYMBOL_GPL(skb_mpls_push);
* @skb: buffer
* @next_proto: ethertype of header after popped MPLS header
* @mac_len: length of the MAC header
* @ethernet: flag to indicate if ethernet header is present in packet
* @ethernet: flag to indicate if the packet is ethernet
*
* Expects skb->data at mac header.
*