Skip to content

Commit

Permalink
Linux Kernel 3.10.10 compiles and runs (.rej cleaned up)
Browse files Browse the repository at this point in the history
Applied:
/LineageOS/android/kernel/sony/msm8994$ patch -p1 -R <
/home/dj/Downloads/linuxkernelpatches/patch-3.10.10-11

Change-Id: I244b9b9ac1945d32836a57909ab3fc536d5f7f5e
  • Loading branch information
djStolen committed Jan 13, 2024
1 parent 16c31e5 commit 133f0fd
Show file tree
Hide file tree
Showing 50 changed files with 124 additions and 220 deletions.
1 change: 0 additions & 1 deletion Documentation/hwmon/k10temp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Supported chips:
* AMD Family 12h processors: "Llano" (E2/A4/A6/A8-Series)
* AMD Family 14h processors: "Brazos" (C/E/G/Z-Series)
* AMD Family 15h processors: "Bulldozer" (FX-Series), "Trinity"
* AMD Family 16h processors: "Kabini"

Prefix: 'k10temp'
Addresses scanned: PCI space
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 11
SUBLEVEL = 10
EXTRAVERSION =
NAME = TOSSUG Baby Fish

Expand Down
1 change: 0 additions & 1 deletion arch/arm/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ static void __init xen_percpu_init(void *unused)
per_cpu(xen_vcpu, cpu) = vcpup;

enable_percpu_irq(xen_events_irq, 0);
put_cpu();
}

static void xen_restart(char str, const char *cmd)
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,6 @@ config RELOCATABLE
must live at a different physical address than the primary
kernel.

# This value must have zeroes in the bottom 60 bits otherwise lots will break
config PAGE_OFFSET
hex
default "0xc000000000000000"
Expand Down
10 changes: 0 additions & 10 deletions arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,9 @@ extern long long virt_phys_offset;
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET))
#define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET)
#else
#ifdef CONFIG_PPC64
/*
* gcc miscompiles (unsigned long)(&static_var) - PAGE_OFFSET
* with -mcmodel=medium, so we use & and | instead of - and + on 64-bit.
*/
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) | PAGE_OFFSET))
#define __pa(x) ((unsigned long)(x) & 0x0fffffffffffffffUL)

#else /* 32-bit, non book E */
#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + PAGE_OFFSET - MEMORY_START))
#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET + MEMORY_START)
#endif
#endif

/*
* Unfortunately the PLT is in the BSS in the PPC32 ELF ABI,
Expand Down
22 changes: 13 additions & 9 deletions arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@
#include <asm/vdso_datapage.h>
#include <asm/vio.h>
#include <asm/mmu.h>
#include <asm/machdep.h>


/*
* This isn't a module but we expose that to userspace
* via /proc so leave the definitions here
*/
#define MODULE_VERS "1.9"
#define MODULE_NAME "lparcfg"

Expand Down Expand Up @@ -424,8 +418,7 @@ static void parse_em_data(struct seq_file *m)
{
unsigned long retbuf[PLPAR_HCALL_BUFSIZE];

if (firmware_has_feature(FW_FEATURE_LPAR) &&
plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
if (plpar_hcall(H_GET_EM_PARMS, retbuf) == H_SUCCESS)
seq_printf(m, "power_mode_data=%016lx\n", retbuf[0]);
}

Expand Down Expand Up @@ -684,6 +677,7 @@ static int lparcfg_open(struct inode *inode, struct file *file)
}

static const struct file_operations lparcfg_fops = {
.owner = THIS_MODULE,
.read = seq_read,
.write = lparcfg_write,
.open = lparcfg_open,
Expand All @@ -705,4 +699,14 @@ static int __init lparcfg_init(void)
}
return 0;
}
machine_device_initcall(pseries, lparcfg_init);

static void __exit lparcfg_cleanup(void)
{
remove_proc_subtree("powerpc/lparcfg", NULL);
}

module_init(lparcfg_init);
module_exit(lparcfg_cleanup);
MODULE_DESCRIPTION("Interface for LPAR configuration data");
MODULE_AUTHOR("Dave Engebretsen");
MODULE_LICENSE("GPL");
4 changes: 2 additions & 2 deletions arch/x86/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ __ref void *alloc_low_pages(unsigned int num)
return __va(pfn << PAGE_SHIFT);
}

/* need 3 4k for initial PMD_SIZE, 3 4k for 0-ISA_END_ADDRESS */
#define INIT_PGT_BUF_SIZE (6 * PAGE_SIZE)
/* need 4 4k for initial PMD_SIZE, 4k for 0-ISA_END_ADDRESS */
#define INIT_PGT_BUF_SIZE (5 * PAGE_SIZE)
RESERVE_BRK(early_pgt_alloc, INIT_PGT_BUF_SIZE);
void __init early_alloc_pgt_buf(void)
{
Expand Down
4 changes: 0 additions & 4 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,6 @@ static struct dmi_system_id __initdata ec_dmi_table[] = {
ec_skip_dsdt_scan, "HP Folio 13", {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13"),}, NULL},
{
ec_validate_ecdt, "ASUS hardware", {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTek Computer Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),}, NULL},
{},
};

Expand Down
2 changes: 0 additions & 2 deletions drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ static ssize_t show_mem_removable(struct device *dev,
container_of(dev, struct memory_block, dev);

for (i = 0; i < sections_per_block; i++) {
if (!present_section_nr(mem->start_section_nr + i))
continue;
pfn = section_nr_to_pfn(mem->start_section_nr + i);
ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
rbnode = kzalloc(sizeof *rbnode, GFP_KERNEL);
if (!rbnode)
return -ENOMEM;
rbnode->blklen = 1;
rbnode->blklen = sizeof(*rbnode);
rbnode->base_reg = reg;
rbnode->block = kmalloc(rbnode->blklen * map->cache_word_size,
GFP_KERNEL);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4246,7 +4246,7 @@
#define EDP_LINK_TRAIN_600MV_0DB_IVB (0x30 <<22)
#define EDP_LINK_TRAIN_600MV_3_5DB_IVB (0x36 <<22)
#define EDP_LINK_TRAIN_800MV_0DB_IVB (0x38 <<22)
#define EDP_LINK_TRAIN_800MV_3_5DB_IVB (0x3e <<22)
#define EDP_LINK_TRAIN_800MV_3_5DB_IVB (0x33 <<22)

/* legacy values */
#define EDP_LINK_TRAIN_500MV_0DB_IVB (0x00 <<22)
Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/nouveau/core/include/subdev/mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ nouveau_mc(void *obj)
return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_MC];
}

#define nouveau_mc_create(p,e,o,m,d) \
nouveau_mc_create_((p), (e), (o), (m), sizeof(**d), (void **)d)
#define nouveau_mc_create(p,e,o,d) \
nouveau_mc_create_((p), (e), (o), sizeof(**d), (void **)d)
#define nouveau_mc_destroy(p) ({ \
struct nouveau_mc *pmc = (p); _nouveau_mc_dtor(nv_object(pmc)); \
})
Expand All @@ -33,8 +33,7 @@ nouveau_mc(void *obj)
})

int nouveau_mc_create_(struct nouveau_object *, struct nouveau_object *,
struct nouveau_oclass *, const struct nouveau_mc_intr *,
int, void **);
struct nouveau_oclass *, int, void **);
void _nouveau_mc_dtor(struct nouveau_object *);
int _nouveau_mc_init(struct nouveau_object *);
int _nouveau_mc_fini(struct nouveau_object *, bool);
Expand Down
6 changes: 1 addition & 5 deletions drivers/gpu/drm/nouveau/core/subdev/mc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ _nouveau_mc_dtor(struct nouveau_object *object)

int
nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine,
struct nouveau_oclass *oclass,
const struct nouveau_mc_intr *intr_map,
int length, void **pobject)
struct nouveau_oclass *oclass, int length, void **pobject)
{
struct nouveau_device *device = nv_device(parent);
struct nouveau_mc *pmc;
Expand All @@ -94,8 +92,6 @@ nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine,
if (ret)
return ret;

pmc->intr_map = intr_map;

ret = request_irq(device->pdev->irq, nouveau_mc_intr,
IRQF_SHARED, "nouveau", pmc);
if (ret < 0)
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ nv04_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nv04_mc_priv *priv;
int ret;

ret = nouveau_mc_create(parent, engine, oclass, nv04_mc_intr, &priv);
ret = nouveau_mc_create(parent, engine, oclass, &priv);
*pobject = nv_object(priv);
if (ret)
return ret;

priv->base.intr_map = nv04_mc_intr;
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/mc/nv44.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ nv44_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nv44_mc_priv *priv;
int ret;

ret = nouveau_mc_create(parent, engine, oclass, nv04_mc_intr, &priv);
ret = nouveau_mc_create(parent, engine, oclass, &priv);
*pobject = nv_object(priv);
if (ret)
return ret;

priv->base.intr_map = nv04_mc_intr;
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ nv50_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nv50_mc_priv *priv;
int ret;

ret = nouveau_mc_create(parent, engine, oclass, nv50_mc_intr, &priv);
ret = nouveau_mc_create(parent, engine, oclass, &priv);
*pobject = nv_object(priv);
if (ret)
return ret;

priv->base.intr_map = nv50_mc_intr;
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/mc/nv98.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ nv98_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nv98_mc_priv *priv;
int ret;

ret = nouveau_mc_create(parent, engine, oclass, nv98_mc_intr, &priv);
ret = nouveau_mc_create(parent, engine, oclass, &priv);
*pobject = nv_object(priv);
if (ret)
return ret;

priv->base.intr_map = nv98_mc_intr;
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/core/subdev/mc/nvc0.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ nvc0_mc_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
struct nvc0_mc_priv *priv;
int ret;

ret = nouveau_mc_create(parent, engine, oclass, nvc0_mc_intr, &priv);
ret = nouveau_mc_create(parent, engine, oclass, &priv);
*pobject = nv_object(priv);
if (ret)
return ret;

priv->base.intr_map = nvc0_mc_intr;
return 0;
}

Expand Down
58 changes: 19 additions & 39 deletions drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
#include <drm/drmP.h>
#include <drm/ttm/ttm_bo_driver.h>

#define VMW_PPN_SIZE (sizeof(unsigned long))
/* A future safe maximum remap size. */
#define VMW_PPN_PER_REMAP ((31 * 1024) / VMW_PPN_SIZE)
#define VMW_PPN_SIZE sizeof(unsigned long)

static int vmw_gmr2_bind(struct vmw_private *dev_priv,
struct page *pages[],
Expand All @@ -40,61 +38,43 @@ static int vmw_gmr2_bind(struct vmw_private *dev_priv,
{
SVGAFifoCmdDefineGMR2 define_cmd;
SVGAFifoCmdRemapGMR2 remap_cmd;
uint32_t define_size = sizeof(define_cmd) + 4;
uint32_t remap_size = VMW_PPN_SIZE * num_pages + sizeof(remap_cmd) + 4;
uint32_t *cmd;
uint32_t *cmd_orig;
uint32_t define_size = sizeof(define_cmd) + sizeof(*cmd);
uint32_t remap_num = num_pages / VMW_PPN_PER_REMAP + ((num_pages % VMW_PPN_PER_REMAP) > 0);
uint32_t remap_size = VMW_PPN_SIZE * num_pages + (sizeof(remap_cmd) + sizeof(*cmd)) * remap_num;
uint32_t remap_pos = 0;
uint32_t cmd_size = define_size + remap_size;
uint32_t i;

cmd_orig = cmd = vmw_fifo_reserve(dev_priv, cmd_size);
cmd_orig = cmd = vmw_fifo_reserve(dev_priv, define_size + remap_size);
if (unlikely(cmd == NULL))
return -ENOMEM;

define_cmd.gmrId = gmr_id;
define_cmd.numPages = num_pages;

*cmd++ = SVGA_CMD_DEFINE_GMR2;
memcpy(cmd, &define_cmd, sizeof(define_cmd));
cmd += sizeof(define_cmd) / sizeof(*cmd);

/*
* Need to split the command if there are too many
* pages that goes into the gmr.
*/

remap_cmd.gmrId = gmr_id;
remap_cmd.flags = (VMW_PPN_SIZE > sizeof(*cmd)) ?
SVGA_REMAP_GMR2_PPN64 : SVGA_REMAP_GMR2_PPN32;
remap_cmd.offsetPages = 0;
remap_cmd.numPages = num_pages;

while (num_pages > 0) {
unsigned long nr = min(num_pages, (unsigned long)VMW_PPN_PER_REMAP);

remap_cmd.offsetPages = remap_pos;
remap_cmd.numPages = nr;
*cmd++ = SVGA_CMD_DEFINE_GMR2;
memcpy(cmd, &define_cmd, sizeof(define_cmd));
cmd += sizeof(define_cmd) / sizeof(uint32);

*cmd++ = SVGA_CMD_REMAP_GMR2;
memcpy(cmd, &remap_cmd, sizeof(remap_cmd));
cmd += sizeof(remap_cmd) / sizeof(*cmd);
*cmd++ = SVGA_CMD_REMAP_GMR2;
memcpy(cmd, &remap_cmd, sizeof(remap_cmd));
cmd += sizeof(remap_cmd) / sizeof(uint32);

for (i = 0; i < nr; ++i) {
if (VMW_PPN_SIZE <= 4)
*cmd = page_to_pfn(*pages++);
else
*((uint64_t *)cmd) = page_to_pfn(*pages++);
for (i = 0; i < num_pages; ++i) {
if (VMW_PPN_SIZE <= 4)
*cmd = page_to_pfn(*pages++);
else
*((uint64_t *)cmd) = page_to_pfn(*pages++);

cmd += VMW_PPN_SIZE / sizeof(*cmd);
}

num_pages -= nr;
remap_pos += nr;
cmd += VMW_PPN_SIZE / sizeof(*cmd);
}

BUG_ON(cmd != cmd_orig + cmd_size / sizeof(*cmd));

vmw_fifo_commit(dev_priv, cmd_size);
vmw_fifo_commit(dev_priv, define_size + remap_size);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ config SENSORS_K10TEMP
If you say yes here you get support for the temperature
sensor(s) inside your CPU. Supported are later revisions of
the AMD Family 10h and all revisions of the AMD Family 11h,
12h (Llano), 14h (Brazos), 15h (Bulldozer/Trinity) and
16h (Kabini) microarchitectures.
12h (Llano), 14h (Brazos) and 15h (Bulldozer/Trinity)
microarchitectures.

This driver can also be built as a module. If so, the module
will be called k10temp.
Expand Down
3 changes: 1 addition & 2 deletions drivers/hwmon/k10temp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* k10temp.c - AMD Family 10h/11h/12h/14h/15h/16h processor hardware monitoring
* k10temp.c - AMD Family 10h/11h/12h/14h/15h processor hardware monitoring
*
* Copyright (c) 2009 Clemens Ladisch <[email protected]>
*
Expand Down Expand Up @@ -211,7 +211,6 @@ static DEFINE_PCI_DEVICE_TABLE(k10temp_id_table) = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{}
};
MODULE_DEVICE_TABLE(pci, k10temp_id_table);
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/hpilo.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ static int ilo_probe(struct pci_dev *pdev,

/* Ignore subsystem_device = 0x1979 (set by BIOS) */
if (pdev->subsystem_device == 0x1979)
return 0;
goto out;

if (max_ccb > MAX_CCB)
max_ccb = MAX_CCB;
Expand Down Expand Up @@ -899,7 +899,7 @@ static void __exit ilo_exit(void)
class_destroy(ilo_class);
}

MODULE_VERSION("1.4.1");
MODULE_VERSION("1.4");
MODULE_ALIAS(ILO_NAME);
MODULE_DESCRIPTION(ILO_NAME);
MODULE_AUTHOR("David Altobelli <[email protected]>");
Expand Down
Loading

0 comments on commit 133f0fd

Please sign in to comment.