From 5af55933e063c01f64bba78f352e95b978a47cc1 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 23 Feb 2020 14:55:25 +0100 Subject: x86: copy kernel patches from 4.19 to 5.4 Signed-off-by: Hauke Mehrtens --- .../x86/patches-5.4/011-tune_lzma_options.patch | 22 ++++++++++++++++ .../x86/patches-5.4/100-fix_cs5535_clockevt.patch | 12 +++++++++ .../patches-5.4/200-pcengines-apu2-reboot.patch | 19 ++++++++++++++ .../800-hwmon-w83627ehf-dont-claim-nct677x.patch | 30 ++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 target/linux/x86/patches-5.4/011-tune_lzma_options.patch create mode 100644 target/linux/x86/patches-5.4/100-fix_cs5535_clockevt.patch create mode 100644 target/linux/x86/patches-5.4/200-pcengines-apu2-reboot.patch create mode 100644 target/linux/x86/patches-5.4/800-hwmon-w83627ehf-dont-claim-nct677x.patch (limited to 'target/linux/x86/patches-5.4') diff --git a/target/linux/x86/patches-5.4/011-tune_lzma_options.patch b/target/linux/x86/patches-5.4/011-tune_lzma_options.patch new file mode 100644 index 0000000000..09d3c6c7ce --- /dev/null +++ b/target/linux/x86/patches-5.4/011-tune_lzma_options.patch @@ -0,0 +1,22 @@ +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -325,7 +325,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) + + quiet_cmd_lzma = LZMA $@ + cmd_lzma = (cat $(filter-out FORCE,$^) | \ +- lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ ++ lzma e -lc8 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ + (rm -f $@ ; false) + + quiet_cmd_lzo = LZO $@ +--- a/arch/x86/include/asm/boot.h ++++ b/arch/x86/include/asm/boot.h +@@ -24,7 +24,7 @@ + # error "Invalid value for CONFIG_PHYSICAL_ALIGN" + #endif + +-#ifdef CONFIG_KERNEL_BZIP2 ++#if defined(CONFIG_KERNEL_BZIP2) || defined(CONFIG_KERNEL_LZMA) + # define BOOT_HEAP_SIZE 0x400000 + #else /* !CONFIG_KERNEL_BZIP2 */ + # define BOOT_HEAP_SIZE 0x10000 diff --git a/target/linux/x86/patches-5.4/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-5.4/100-fix_cs5535_clockevt.patch new file mode 100644 index 0000000000..c3a7fce9ce --- /dev/null +++ b/target/linux/x86/patches-5.4/100-fix_cs5535_clockevt.patch @@ -0,0 +1,12 @@ +--- a/drivers/clocksource/cs5535-clockevt.c ++++ b/drivers/clocksource/cs5535-clockevt.c +@@ -130,7 +130,8 @@ static irqreturn_t mfgpt_tick(int irq, v + cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP, + MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2); + +- cs5535_clockevent.event_handler(&cs5535_clockevent); ++ if (cs5535_clockevent.event_handler) ++ cs5535_clockevent.event_handler(&cs5535_clockevent); + return IRQ_HANDLED; + } + diff --git a/target/linux/x86/patches-5.4/200-pcengines-apu2-reboot.patch b/target/linux/x86/patches-5.4/200-pcengines-apu2-reboot.patch new file mode 100644 index 0000000000..1426140183 --- /dev/null +++ b/target/linux/x86/patches-5.4/200-pcengines-apu2-reboot.patch @@ -0,0 +1,19 @@ +--- a/arch/x86/kernel/reboot.c ++++ b/arch/x86/kernel/reboot.c +@@ -469,6 +469,16 @@ static const struct dmi_system_id reboot + }, + }, + ++ /* PC Engines */ ++ { /* Handle problems with rebooting on PC Engines apu2 */ ++ .callback = set_pci_reboot, ++ .ident = "PC Engines apu2", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_BOARD_NAME, "apu2"), ++ }, ++ }, ++ + /* Sony */ + { /* Handle problems with rebooting on Sony VGN-Z540N */ + .callback = set_bios_reboot, diff --git a/target/linux/x86/patches-5.4/800-hwmon-w83627ehf-dont-claim-nct677x.patch b/target/linux/x86/patches-5.4/800-hwmon-w83627ehf-dont-claim-nct677x.patch new file mode 100644 index 0000000000..ef2e1333e7 --- /dev/null +++ b/target/linux/x86/patches-5.4/800-hwmon-w83627ehf-dont-claim-nct677x.patch @@ -0,0 +1,30 @@ +--- a/drivers/hwmon/w83627ehf.c ++++ b/drivers/hwmon/w83627ehf.c +@@ -2717,8 +2717,8 @@ static int __init w83627ehf_find(int sio + static const char sio_name_W83627UHG[] __initconst = "W83627UHG"; + static const char sio_name_W83667HG[] __initconst = "W83667HG"; + static const char sio_name_W83667HG_B[] __initconst = "W83667HG-B"; +- static const char sio_name_NCT6775[] __initconst = "NCT6775F"; +- static const char sio_name_NCT6776[] __initconst = "NCT6776F"; ++/* static const char sio_name_NCT6775[] __initconst = "NCT6775F"; ++ static const char sio_name_NCT6776[] __initconst = "NCT6776F"; */ + + u16 val; + const char *sio_name; +@@ -2762,14 +2762,14 @@ static int __init w83627ehf_find(int sio + sio_data->kind = w83667hg_b; + sio_name = sio_name_W83667HG_B; + break; +- case SIO_NCT6775_ID: ++/* case SIO_NCT6775_ID: + sio_data->kind = nct6775; + sio_name = sio_name_NCT6775; + break; + case SIO_NCT6776_ID: + sio_data->kind = nct6776; + sio_name = sio_name_NCT6776; +- break; ++ break; */ + default: + if (val != 0xffff) + pr_debug("unsupported chip ID: 0x%04x\n", val); -- cgit v1.2.3