Skip to content

Commit

Permalink
Linux Kernel 3.10.33 compiles and runs (setup.c.rej dropped)
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.33-34

arch/arm/kernel/setup.c.rej dropped

Change-Id: I251ef51671693e9b65b499711fae8c580f2ec540
  • Loading branch information
djStolen committed Dec 23, 2023
1 parent e001852 commit e2e50a4
Show file tree
Hide file tree
Showing 100 changed files with 307 additions and 579 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 = 34
SUBLEVEL = 33
EXTRAVERSION =
NAME = TOSSUG Baby Fish

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
" subs %1, %0, %0, ror #16\n"
" addeq %0, %0, %4\n"
" strexeq %2, %0, [%3]"
: "=&r" (slock), "=&r" (contended), "=&r" (res)
: "=&r" (slock), "=&r" (contended), "=r" (res)
: "r" (&lock->slock), "I" (1 << TICKET_SHIFT)
: "cc");
} while (res);
Expand Down
12 changes: 3 additions & 9 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,16 +612,10 @@ int __init arm_add_memory(phys_addr_t start, phys_addr_t size)
* Size is appropriately rounded down, start is rounded up.
*/
size -= start & ~PAGE_MASK;
aligned_start = PAGE_ALIGN(start);
bank->start = PAGE_ALIGN(start);

#ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT
if (aligned_start > ULONG_MAX) {
printk(KERN_CRIT "Ignoring memory at 0x%08llx outside "
"32-bit physical address space\n", (long long)start);
return -EINVAL;
}

if (aligned_start + size > ULONG_MAX) {
#ifndef CONFIG_ARM_LPAE
if (bank->start + size < bank->start) {
printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in "
"32-bit physical address space\n", (long long)start);
/*
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-sa1100/include/mach/collie.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#ifndef __ASM_ARCH_COLLIE_H
#define __ASM_ARCH_COLLIE_H

#include "hardware.h" /* Gives GPIO_MAX */

extern void locomolcd_power(int on);

#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
Expand Down
1 change: 0 additions & 1 deletion arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#define _ASM_MIPSREGS_H

#include <linux/linkage.h>
#include <linux/types.h>
#include <asm/hazards.h>
#include <asm/war.h>

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/reloc_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ _GLOBAL(relocate)

6: blr

.balign 8
p_dyn: .llong __dynamic_start - 0b
p_rela: .llong __rela_dyn_start - 0b
p_st: .llong _stext - 0b
Expand Down
7 changes: 1 addition & 6 deletions arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,6 @@ ENDPROC(early_idt_handlers)
/* This is global to keep gas from relaxing the jumps */
ENTRY(early_idt_handler)
cld

cmpl $2,(%esp) # X86_TRAP_NMI
je is_nmi # Ignore NMI

cmpl $2,%ss:early_recursion_flag
je hlt_loop
incl %ss:early_recursion_flag
Expand Down Expand Up @@ -620,9 +616,8 @@ ex_entry:
pop %edx
pop %ecx
pop %eax
decl %ss:early_recursion_flag
is_nmi:
addl $8,%esp /* drop vector number and error code */
decl %ss:early_recursion_flag
iret
ENDPROC(early_idt_handler)

Expand Down
6 changes: 1 addition & 5 deletions arch/x86/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ early_idt_handlers:
ENTRY(early_idt_handler)
cld

cmpl $2,(%rsp) # X86_TRAP_NMI
je is_nmi # Ignore NMI

cmpl $2,early_recursion_flag(%rip)
jz 1f
incl early_recursion_flag(%rip)
Expand Down Expand Up @@ -408,9 +405,8 @@ ENTRY(early_idt_handler)
popq %rdx
popq %rcx
popq %rax
decl early_recursion_flag(%rip)
is_nmi:
addq $16,%rsp # drop vector number and error code
decl early_recursion_flag(%rip)
INTERRUPT_RETURN
ENDPROC(early_idt_handler)

Expand Down
15 changes: 3 additions & 12 deletions arch/x86/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,10 @@ EXPORT_SYMBOL(__kernel_fpu_begin);

void __kernel_fpu_end(void)
{
if (use_eager_fpu()) {
/*
* For eager fpu, most the time, tsk_used_math() is true.
* Restore the user math as we are done with the kernel usage.
* At few instances during thread exit, signal handling etc,
* tsk_used_math() is false. Those few places will take proper
* actions, so we don't need to restore the math here.
*/
if (likely(tsk_used_math(current)))
math_state_restore();
} else {
if (use_eager_fpu())
math_state_restore();
else
stts();
}
}
EXPORT_SYMBOL(__kernel_fpu_end);

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev)
return;

pci_read_config_dword(nb_ht, 0x60, &val);
node = pcibus_to_node(dev->bus) | (val & 7);
node = val & 7;
/*
* Some hardware may return an invalid node ID,
* so check it first:
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2985,8 +2985,10 @@ static int cr8_write_interception(struct vcpu_svm *svm)
u8 cr8_prev = kvm_get_cr8(&svm->vcpu);
/* instruction emulation calls kvm_set_cr8() */
r = cr_interception(svm);
if (irqchip_in_kernel(svm->vcpu.kvm))
if (irqchip_in_kernel(svm->vcpu.kvm)) {
clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);
return r;
}
if (cr8_prev <= kvm_get_cr8(&svm->vcpu))
return r;
kvm_run->exit_reason = KVM_EXIT_SET_TPR;
Expand Down Expand Up @@ -3548,8 +3550,6 @@ static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr)
if (is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK))
return;

clr_cr_intercept(svm, INTERCEPT_CR8_WRITE);

if (irr == -1)
return;

Expand Down
10 changes: 0 additions & 10 deletions drivers/acpi/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,18 @@ bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res)
switch (ares->type) {
case ACPI_RESOURCE_TYPE_MEMORY24:
memory24 = &ares->data.memory24;
if (!memory24->address_length)
return false;
acpi_dev_get_memresource(res, memory24->minimum,
memory24->address_length,
memory24->write_protect);
break;
case ACPI_RESOURCE_TYPE_MEMORY32:
memory32 = &ares->data.memory32;
if (!memory32->address_length)
return false;
acpi_dev_get_memresource(res, memory32->minimum,
memory32->address_length,
memory32->write_protect);
break;
case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
fixed_memory32 = &ares->data.fixed_memory32;
if (!fixed_memory32->address_length)
return false;
acpi_dev_get_memresource(res, fixed_memory32->address,
fixed_memory32->address_length,
fixed_memory32->write_protect);
Expand Down Expand Up @@ -150,16 +144,12 @@ bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res)
switch (ares->type) {
case ACPI_RESOURCE_TYPE_IO:
io = &ares->data.io;
if (!io->address_length)
return false;
acpi_dev_get_ioresource(res, io->minimum,
io->address_length,
io->io_decode);
break;
case ACPI_RESOURCE_TYPE_FIXED_IO:
fixed_io = &ares->data.fixed_io;
if (!fixed_io->address_length)
return false;
acpi_dev_get_ioresource(res, fixed_io->address,
fixed_io->address_length,
ACPI_DECODE_10);
Expand Down
32 changes: 17 additions & 15 deletions drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,6 @@ static int acpi_sleep_prepare(u32 acpi_state)
return 0;
}

static bool acpi_sleep_state_supported(u8 sleep_state)
{
acpi_status status;
u8 type_a, type_b;

status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
|| (acpi_gbl_FADT.sleep_control.address
&& acpi_gbl_FADT.sleep_status.address));
}

#ifdef CONFIG_ACPI_SLEEP
static u32 acpi_target_sleep_state = ACPI_STATE_S0;

Expand Down Expand Up @@ -611,9 +600,15 @@ static void acpi_sleep_suspend_setup(void)
{
int i;

for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++)
if (acpi_sleep_state_supported(i))
for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) {
acpi_status status;
u8 type_a, type_b;

status = acpi_get_sleep_type_data(i, &type_a, &type_b);
if (ACPI_SUCCESS(status)) {
sleep_states[i] = 1;
}
}

suspend_set_ops(old_suspend_ordering ?
&acpi_suspend_ops_old : &acpi_suspend_ops);
Expand Down Expand Up @@ -744,7 +739,11 @@ static const struct platform_hibernation_ops acpi_hibernation_ops_old = {

static void acpi_sleep_hibernate_setup(void)
{
if (!acpi_sleep_state_supported(ACPI_STATE_S4))
acpi_status status;
u8 type_a, type_b;

status = acpi_get_sleep_type_data(ACPI_STATE_S4, &type_a, &type_b);
if (ACPI_FAILURE(status))
return;

hibernation_set_ops(old_suspend_ordering ?
Expand Down Expand Up @@ -793,6 +792,8 @@ static void acpi_power_off(void)

int __init acpi_sleep_init(void)
{
acpi_status status;
u8 type_a, type_b;
char supported[ACPI_S_STATE_COUNT * 3 + 1];
char *pos = supported;
int i;
Expand All @@ -807,7 +808,8 @@ int __init acpi_sleep_init(void)
acpi_sleep_suspend_setup();
acpi_sleep_hibernate_setup();

if (acpi_sleep_state_supported(ACPI_STATE_S5)) {
status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b);
if (ACPI_SUCCESS(status)) {
sleep_states[ACPI_STATE_S5] = 1;
pm_power_off_prepare = acpi_power_off_prepare;
pm_power_off = acpi_power_off;
Expand Down
1 change: 0 additions & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4152,7 +4152,6 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {

/* Seagate Momentus SpinPoint M8 seem to have FPMDA_AA issues */
{ "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA },
{ "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA },

/* Blacklist entries taken from Silicon Image 3124/3132
Windows driver .inf file - also several Linux problem reports */
Expand Down
22 changes: 7 additions & 15 deletions drivers/firewire/core-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ static int lookup_existing_device(struct device *dev, void *data)
old->config_rom_retries = 0;
fw_notice(card, "rediscovered device %s\n", dev_name(dev));

old->workfn = fw_device_update;
PREPARE_DELAYED_WORK(&old->work, fw_device_update);
fw_schedule_device_work(old, 0);

if (current_node == card->root_node)
Expand Down Expand Up @@ -1054,7 +1054,7 @@ static void fw_device_init(struct work_struct *work)
if (atomic_cmpxchg(&device->state,
FW_DEVICE_INITIALIZING,
FW_DEVICE_RUNNING) == FW_DEVICE_GONE) {
device->workfn = fw_device_shutdown;
PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
fw_schedule_device_work(device, SHUTDOWN_DELAY);
} else {
fw_notice(card, "created device %s: GUID %08x%08x, S%d00\n",
Expand Down Expand Up @@ -1175,20 +1175,13 @@ static void fw_device_refresh(struct work_struct *work)
dev_name(&device->device), fw_rcode_string(ret));
gone:
atomic_set(&device->state, FW_DEVICE_GONE);
device->workfn = fw_device_shutdown;
PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
fw_schedule_device_work(device, SHUTDOWN_DELAY);
out:
if (node_id == card->root_node->node_id)
fw_schedule_bm_work(card, 0);
}

static void fw_device_workfn(struct work_struct *work)
{
struct fw_device *device = container_of(to_delayed_work(work),
struct fw_device, work);
device->workfn(work);
}

void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
{
struct fw_device *device;
Expand Down Expand Up @@ -1238,8 +1231,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
* power-up after getting plugged in. We schedule the
* first config rom scan half a second after bus reset.
*/
device->workfn = fw_device_init;
INIT_DELAYED_WORK(&device->work, fw_device_workfn);
INIT_DELAYED_WORK(&device->work, fw_device_init);
fw_schedule_device_work(device, INITIAL_DELAY);
break;

Expand All @@ -1255,7 +1247,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
if (atomic_cmpxchg(&device->state,
FW_DEVICE_RUNNING,
FW_DEVICE_INITIALIZING) == FW_DEVICE_RUNNING) {
device->workfn = fw_device_refresh;
PREPARE_DELAYED_WORK(&device->work, fw_device_refresh);
fw_schedule_device_work(device,
device->is_local ? 0 : INITIAL_DELAY);
}
Expand All @@ -1270,7 +1262,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
smp_wmb(); /* update node_id before generation */
device->generation = card->generation;
if (atomic_read(&device->state) == FW_DEVICE_RUNNING) {
device->workfn = fw_device_update;
PREPARE_DELAYED_WORK(&device->work, fw_device_update);
fw_schedule_device_work(device, 0);
}
break;
Expand All @@ -1295,7 +1287,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
device = node->data;
if (atomic_xchg(&device->state,
FW_DEVICE_GONE) == FW_DEVICE_RUNNING) {
device->workfn = fw_device_shutdown;
PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
fw_schedule_device_work(device,
list_empty(&card->link) ? 0 : SHUTDOWN_DELAY);
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,17 +929,17 @@ static void fwnet_write_complete(struct fw_card *card, int rcode,
if (rcode == RCODE_COMPLETE) {
fwnet_transmit_packet_done(ptask);
} else {
fwnet_transmit_packet_failed(ptask);

if (printk_timed_ratelimit(&j, 1000) || rcode != last_rcode) {
dev_err(&ptask->dev->netdev->dev,
"fwnet_write_complete failed: %x (skipped %d)\n",
rcode, errors_skipped);

errors_skipped = 0;
last_rcode = rcode;
} else {
} else
errors_skipped++;
}
fwnet_transmit_packet_failed(ptask);
}
}

Expand Down
Loading

0 comments on commit e2e50a4

Please sign in to comment.