Skip to content

Commit

Permalink
Linux Kernel 3.10.3 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.3-4

Revert left out:
1) drivers/media/dvb-core/dmxdev.c - code completely different

Change-Id: Ib6486e52a8dc7d561c6f15ab11bd53776e31a843
  • Loading branch information
djStolen committed Jan 14, 2024
1 parent f4d9cf5 commit 353e614
Show file tree
Hide file tree
Showing 76 changed files with 431 additions and 837 deletions.
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 = 4
SUBLEVEL = 3
EXTRAVERSION =
NAME = Unicycling Gorilla

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-footbridge/dc21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)

sys->mem_offset = DC21285_PCI_MEM;

pci_ioremap_io(0, DC21285_PCI_IO);

pci_add_resource_offset(&sys->resources, &res[0], sys->mem_offset);
pci_add_resource_offset(&sys->resources, &res[1], sys->mem_offset);

Expand Down
161 changes: 63 additions & 98 deletions arch/arm/mach-s3c24xx/clock-s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,101 +119,66 @@ static struct clk init_clocks_off[] = {
}
};

static struct clk clk_lcd = {
.name = "lcd",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_LCDC,
};

static struct clk clk_gpio = {
.name = "gpio",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_GPIO,
};

static struct clk clk_usb_host = {
.name = "usb-host",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBH,
};

static struct clk clk_usb_device = {
.name = "usb-device",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBD,
};

static struct clk clk_timers = {
.name = "timers",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_PWMT,
};

struct clk s3c24xx_clk_uart0 = {
.name = "uart",
.devname = "s3c2410-uart.0",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART0,
};

struct clk s3c24xx_clk_uart1 = {
.name = "uart",
.devname = "s3c2410-uart.1",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART1,
};

struct clk s3c24xx_clk_uart2 = {
.name = "uart",
.devname = "s3c2410-uart.2",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART2,
};

static struct clk clk_rtc = {
.name = "rtc",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC,
};

static struct clk clk_watchdog = {
.name = "watchdog",
.parent = &clk_p,
.ctrlbit = 0,
};

static struct clk clk_usb_bus_host = {
.name = "usb-bus-host",
.parent = &clk_usb_bus,
};

static struct clk clk_usb_bus_gadget = {
.name = "usb-bus-gadget",
.parent = &clk_usb_bus,
};

static struct clk *init_clocks[] = {
&clk_lcd,
&clk_gpio,
&clk_usb_host,
&clk_usb_device,
&clk_timers,
&s3c24xx_clk_uart0,
&s3c24xx_clk_uart1,
&s3c24xx_clk_uart2,
&clk_rtc,
&clk_watchdog,
&clk_usb_bus_host,
&clk_usb_bus_gadget,
static struct clk init_clocks[] = {
{
.name = "lcd",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_LCDC,
}, {
.name = "gpio",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_GPIO,
}, {
.name = "usb-host",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBH,
}, {
.name = "usb-device",
.parent = &clk_h,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBD,
}, {
.name = "timers",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_PWMT,
}, {
.name = "uart",
.devname = "s3c2410-uart.0",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART0,
}, {
.name = "uart",
.devname = "s3c2410-uart.1",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART1,
}, {
.name = "uart",
.devname = "s3c2410-uart.2",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART2,
}, {
.name = "rtc",
.parent = &clk_p,
.enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC,
}, {
.name = "watchdog",
.parent = &clk_p,
.ctrlbit = 0,
}, {
.name = "usb-bus-host",
.parent = &clk_usb_bus,
}, {
.name = "usb-bus-gadget",
.parent = &clk_usb_bus,
},
};

/* s3c2410_baseclk_add()
Expand All @@ -230,6 +195,7 @@ int __init s3c2410_baseclk_add(void)
{
unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
struct clk *clkp;
struct clk *xtal;
int ret;
int ptr;
Expand All @@ -241,9 +207,8 @@ int __init s3c2410_baseclk_add(void)

/* register clocks from clock array */

for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++) {
struct clk *clkp = init_clocks[ptr];

clkp = init_clocks;
for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
/* ensure that we note the clock state */

clkp->usage = clkcon & clkp->ctrlbit ? 1 : 0;
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-s3c24xx/clock-s3c2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ static struct clk_lookup s3c2440_clk_lookup[] = {
CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
CLKDEV_INIT("s3c2440-uart.0", "uart", &s3c24xx_clk_uart0),
CLKDEV_INIT("s3c2440-uart.1", "uart", &s3c24xx_clk_uart1),
CLKDEV_INIT("s3c2440-uart.2", "uart", &s3c24xx_clk_uart2),
CLKDEV_INIT("s3c2440-camif", "camera", &s3c2440_clk_cam_upll),
};

Expand Down
5 changes: 0 additions & 5 deletions arch/arm/plat-samsung/include/plat/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ extern struct clk clk_ext;
extern struct clksrc_clk clk_epllref;
extern struct clksrc_clk clk_esysclk;

/* S3C24XX UART clocks */
extern struct clk s3c24xx_clk_uart0;
extern struct clk s3c24xx_clk_uart1;
extern struct clk s3c24xx_clk_uart2;

/* S3C64XX specific clocks */
extern struct clk clk_h2;
extern struct clk clk_27m;
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/cavium-octeon/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* Copyright (C) 2008, 2009 Wind River Systems
* written by Ralf Baechle <[email protected]>
*/
#include <linux/compiler.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/console.h>
Expand Down Expand Up @@ -713,7 +712,7 @@ void __init prom_init(void)
if (cvmx_read_csr(CVMX_L2D_FUS3) & (3ull << 34)) {
pr_info("Skipping L2 locking due to reduced L2 cache size\n");
} else {
uint32_t __maybe_unused ebase = read_c0_ebase() & 0x3ffff000;
uint32_t ebase = read_c0_ebase() & 0x3ffff000;
#ifdef CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB
/* TLB refill */
cvmx_l2c_lock_mem_region(ebase, 0x100);
Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ int foo(void)
DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
BLANK();
DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
BLANK();
DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));

/* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
return 0;
Expand Down
8 changes: 4 additions & 4 deletions arch/sparc/mm/hypersparc.S
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hypersparc_flush_cache_mm_out:

/* The things we do for performance... */
hypersparc_flush_cache_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
#ifndef CONFIG_SMP
ld [%o0 + AOFF_mm_context], %g1
cmp %g1, -1
Expand Down Expand Up @@ -163,7 +163,7 @@ hypersparc_flush_cache_range_out:
*/
/* Verified, my ass... */
hypersparc_flush_cache_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
ld [%o0 + AOFF_mm_context], %g2
#ifndef CONFIG_SMP
cmp %g2, -1
Expand Down Expand Up @@ -284,7 +284,7 @@ hypersparc_flush_tlb_mm_out:
sta %g5, [%g1] ASI_M_MMUREGS

hypersparc_flush_tlb_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
Expand All @@ -307,7 +307,7 @@ hypersparc_flush_tlb_range_out:
sta %g5, [%g1] ASI_M_MMUREGS

hypersparc_flush_tlb_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
Expand Down
8 changes: 4 additions & 4 deletions arch/sparc/mm/swift.S
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ swift_flush_cache_mm_out:

.globl swift_flush_cache_range
swift_flush_cache_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
sub %o2, %o1, %o2
sethi %hi(4096), %o3
cmp %o2, %o3
Expand All @@ -116,7 +116,7 @@ swift_flush_cache_range:

.globl swift_flush_cache_page
swift_flush_cache_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
70:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
Expand Down Expand Up @@ -219,7 +219,7 @@ swift_flush_sig_insns:
.globl swift_flush_tlb_range
.globl swift_flush_tlb_all
swift_flush_tlb_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
swift_flush_tlb_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
Expand All @@ -233,7 +233,7 @@ swift_flush_tlb_all_out:

.globl swift_flush_tlb_page
swift_flush_tlb_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
Expand Down
6 changes: 3 additions & 3 deletions arch/sparc/mm/tsunami.S
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/* Sliiick... */
tsunami_flush_cache_page:
tsunami_flush_cache_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
tsunami_flush_cache_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
Expand All @@ -46,7 +46,7 @@ tsunami_flush_sig_insns:

/* More slick stuff... */
tsunami_flush_tlb_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
tsunami_flush_tlb_mm:
ld [%o0 + AOFF_mm_context], %g2
cmp %g2, -1
Expand All @@ -65,7 +65,7 @@ tsunami_flush_tlb_out:

/* This one can be done in a fine grained manner... */
tsunami_flush_tlb_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
andn %o1, (PAGE_SIZE - 1), %o1
Expand Down
10 changes: 5 additions & 5 deletions arch/sparc/mm/viking.S
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ viking_mxcc_flush_page:
viking_flush_cache_page:
viking_flush_cache_range:
#ifndef CONFIG_SMP
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
#endif
viking_flush_cache_mm:
#ifndef CONFIG_SMP
Expand Down Expand Up @@ -148,7 +148,7 @@ viking_flush_tlb_mm:
#endif

viking_flush_tlb_range:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
Expand All @@ -173,7 +173,7 @@ viking_flush_tlb_range:
#endif

viking_flush_tlb_page:
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
mov SRMMU_CTX_REG, %g1
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
Expand Down Expand Up @@ -239,7 +239,7 @@ sun4dsmp_flush_tlb_range:
tst %g5
bne 3f
mov SRMMU_CTX_REG, %g1
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
Expand All @@ -265,7 +265,7 @@ sun4dsmp_flush_tlb_page:
tst %g5
bne 2f
mov SRMMU_CTX_REG, %g1
ld [%o0 + VMA_VM_MM], %o0
ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
ld [%o0 + AOFF_mm_context], %o3
lda [%g1] ASI_M_MMUREGS, %g5
and %o1, PAGE_MASK, %o1
Expand Down
Loading

0 comments on commit 353e614

Please sign in to comment.