Skip to contentSkip to conversation

x86/platform changes for v4.11

GIT PULL Ingo Molnar 2 participants 3 messages Feb 20, 2017 – Feb 21, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-platform-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-platform-for-linus

# HEAD: d48085f0716f195ee7432de2dd110e2093c40fd5 x86/platform/UV/NMI: Fix uneccessary kABI breakage

Misc platform updates: SGI UV4 support additions, intel-mid Merrifield enhancements and purge of old code.

out-of-topic modifications in x86-platform-for-linus:
-------------------------------------------------------
drivers/platform/x86/Kconfig # a665ece8b471: x86/platform/intel: Remove P
drivers/platform/x86/Makefile # a665ece8b471: x86/platform/intel: Remove P
drivers/platform/x86/intel_pmic_gpio.c# a665ece8b471: x86/platform/intel: Remove P
include/linux/intel_pmic_gpio.h # a665ece8b471: x86/platform/intel: Remove P

Thanks,

Ingo

------------------>
Andy Shevchenko (10):
x86/platform/intel-mid: Remove Moorestown code x86/platform/intel-mid: Get rid of duplication of IPC handler x86/platform/intel-mid: Enable GPIO keys on Merrifield x86/platform/intel-mid: Make intel_scu_device_register() static x86/platform/intel: Remove PMIC GPIO block support x86/platform/intel-mid: Enable RTC on Intel Merrifield x86/ioapic: Return suitable error code in mp_map_gsi_to_irq() x86/platform/intel-mid: Allocate RTC interrupt for Merrifield x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() x86/platform/intel-mid: Move watchdog registration to arch_initcall()

Ingo Molnar (1):
x86/platform/UV: Clean up the UV APIC code

Mike Travis (2):
x86/platform/UV: Fix panic with missing UVsystab support x86/platform/UV: Fix 2 socket config problem

[email protected] (8):
x86/platform/UV: Add Support for UV4 Hubless systems x86/platform/UV: Add Support for UV4 Hubless NMIs x86/platform/UV: Add basic CPU NMI health check x86/platform/UV: Verify NMI action is valid, default is standard x86/platform/UV: Initialize PCH GPP_D_0 NMI Pin to be NMI source x86/platform/UV: Ensure uv_system_init is called when necessary x86/platform/UV: Clean up the NMI code to match current coding style x86/platform/UV/NMI: Fix uneccessary kABI breakage

 arch/x86/include/asm/intel-mid.h                   |   5 +-
 arch/x86/include/asm/uv/uv.h                       |   2 +
 arch/x86/include/asm/uv/uv_hub.h                   |   3 +
 arch/x86/kernel/apic/io_apic.c                     |   4 +-
 arch/x86/kernel/apic/x2apic_uv_x.c                 | 548 +++++++++++----------
 arch/x86/kernel/smpboot.c                          |   3 +-
 arch/x86/platform/intel-mid/device_libs/Makefile   |   3 +-
 .../intel-mid/device_libs/platform_gpio_keys.c     |   3 +
 .../platform/intel-mid/device_libs/platform_ipc.c  |  68 ---
 .../platform/intel-mid/device_libs/platform_ipc.h  |  18 -
 .../intel-mid/device_libs/platform_mrfld_rtc.c     |  48 ++
 .../intel-mid/device_libs/platform_mrfld_wdt.c     |  12 +-
 .../intel-mid/device_libs/platform_msic_audio.c    |   3 +-
 .../intel-mid/device_libs/platform_msic_battery.c  |   3 +-
 .../intel-mid/device_libs/platform_msic_gpio.c     |   3 +-
 .../intel-mid/device_libs/platform_msic_ocd.c      |   3 +-
 .../device_libs/platform_msic_power_btn.c          |   3 +-
 .../intel-mid/device_libs/platform_msic_thermal.c  |   3 +-
 .../intel-mid/device_libs/platform_pmic_gpio.c     |  54 --
 arch/x86/platform/intel-mid/mrfld.c                |   1 +
 arch/x86/platform/intel-mid/sfi.c                  |  58 ++-
 arch/x86/platform/uv/uv_nmi.c                      | 459 ++++++++++++++---
 drivers/platform/x86/Kconfig                       |   7 -
 drivers/platform/x86/Makefile                      |   1 -
 drivers/platform/x86/intel_pmic_gpio.c             | 326 ------------
 include/linux/intel_pmic_gpio.h                    |  15 -
 26 files changed, 796 insertions(+), 860 deletions(-)
 delete mode 100644 arch/x86/platform/intel-mid/device_libs/platform_ipc.c
 delete mode 100644 arch/x86/platform/intel-mid/device_libs/platform_ipc.h
 create mode 100644 arch/x86/platform/intel-mid/device_libs/platform_mrfld_rtc.c
 delete mode 100644 arch/x86/platform/intel-mid/device_libs/platform_pmic_gpio.c
 delete mode 100644 drivers/platform/x86/intel_pmic_gpio.c
 delete mode 100644 include/linux/intel_pmic_gpio.h
arch/x86/include/asm/intel-mid.h +1 -4
index 49da9f497b90..fe04491130ae 100644
@@ -27,7 +27,6 @@ extern void intel_mid_pwr_power_off(void);
 extern int intel_mid_pwr_get_lss_id(struct pci_dev *pdev);
 
 extern int get_gpio_by_name(const char *name);
-extern void intel_scu_device_register(struct platform_device *pdev);
 extern int __init sfi_parse_mrtc(struct sfi_table_header *table);
 extern int __init sfi_parse_mtmr(struct sfi_table_header *table);
 extern int sfi_mrtc_num;
@@ -42,10 +41,8 @@ struct devs_id {
 	char name[SFI_NAME_LEN + 1];
 	u8 type;
 	u8 delay;
+	u8 msic;
 	void *(*get_platform_data)(void *info);
-	/* Custom handler for devices */
-	void (*device_handler)(struct sfi_device_table_entry *pentry,
-			       struct devs_id *dev);
 };
 
 #define sfi_device(i)								\
arch/x86/include/asm/uv/uv.h +2 -0
index 062921ef34e9..6686820feae9 100644
@@ -10,6 +10,7 @@ struct mm_struct;
 
 extern enum uv_system_type get_uv_system_type(void);
 extern int is_uv_system(void);
+extern int is_uv_hubless(void);
 extern void uv_cpu_init(void);
 extern void uv_nmi_init(void);
 extern void uv_system_init(void);
@@ -23,6 +24,7 @@ extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
 
 static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
 static inline int is_uv_system(void)	{ return 0; }
+static inline int is_uv_hubless(void)	{ return 0; }
 static inline void uv_cpu_init(void)	{ }
 static inline void uv_system_init(void)	{ }
 static inline const struct cpumask *
arch/x86/include/asm/uv/uv_hub.h +3 -0
index 097b80c989c4..72e8300b1e8a 100644
@@ -772,6 +772,7 @@ static inline int uv_num_possible_blades(void)
 
 /* Per Hub NMI support */
 extern void uv_nmi_setup(void);
+extern void uv_nmi_setup_hubless(void);
 
 /* BMC sets a bit this MMR non-zero before sending an NMI */
 #define UVH_NMI_MMR		UVH_SCRATCH5
@@ -799,6 +800,8 @@ struct uv_hub_nmi_s {
 	atomic_t	read_mmr_count;	/* count of MMR reads */
 	atomic_t	nmi_count;	/* count of true UV NMIs */
 	unsigned long	nmi_value;	/* last value read from NMI MMR */
+	bool		hub_present;	/* false means UV hubless system */
+	bool		pch_owner;	/* indicates this hub owns PCH */
 };
 
 struct uv_cpu_nmi_s {
arch/x86/kernel/apic/io_apic.c +2 -2
index 1e35dd06b090..86a959d02932 100644
@@ -1107,12 +1107,12 @@ int mp_map_gsi_to_irq(u32 gsi, unsigned int flags, struct irq_alloc_info *info)
 
 	ioapic = mp_find_ioapic(gsi);
 	if (ioapic < 0)
-		return -1;
+		return -ENODEV;
 
 	pin = mp_find_ioapic_pin(ioapic, gsi);
 	idx = find_irq_entry(ioapic, pin, mp_INT);
 	if ((flags & IOAPIC_MAP_CHECK) && idx < 0)
-		return -1;
+		return -ENODEV;
 
 	return mp_map_pin_to_irq(gsi, idx, ioapic, pin, flags, info);
 }
arch/x86/kernel/apic/x2apic_uv_x.c +288 -260

1,113 lines not on this page · raw message

arch/x86/kernel/smpboot.c +1 -2
index 46732dc3b73c..386c7f713c2a 100644
@@ -1341,8 +1341,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 	pr_info("CPU0: ");
 	print_cpu_info(&cpu_data(0));
 
-	if (is_uv_system())
-		uv_system_init();
+	uv_system_init();
 
 	set_mtrr_aps_delayed_init();
 
arch/x86/platform/intel-mid/device_libs/Makefile +1 -2
index 90e4f2a6625b..a7dbec4dce27 100644
@@ -5,14 +5,12 @@ obj-$(subst m,y,$(CONFIG_MMC_SDHCI_PCI)) += platform_mrfld_sd.o
 # WiFi
 obj-$(subst m,y,$(CONFIG_BRCMFMAC_SDIO)) += platform_bcm43xx.o
 # IPC Devices
-obj-y += platform_ipc.o
 obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic.o
 obj-$(subst m,y,$(CONFIG_SND_MFLD_MACHINE)) += platform_msic_audio.o
 obj-$(subst m,y,$(CONFIG_GPIO_MSIC)) += platform_msic_gpio.o
 obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic_ocd.o
 obj-$(subst m,y,$(CONFIG_MFD_INTEL_MSIC)) += platform_msic_battery.o
 obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_msic_power_btn.o
-obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o
 obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o
 # SPI Devices
 obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_mrfld_spidev.o
@@ -28,4 +26,5 @@ obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o
 obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 # MISC Devices
 obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
+obj-$(subst m,y,$(CONFIG_RTC_DRV_CMOS)) += platform_mrfld_rtc.o
 obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_mrfld_wdt.o
arch/x86/platform/intel-mid/device_libs/platform_gpio_keys.c +3 -0
index 52534ec29765..74283875c7e8 100644
@@ -32,6 +32,9 @@ static struct gpio_keys_button gpio_button[] = {
 	{SW_LID,		-1, 1, "lid_switch",	EV_SW,  0, 20},
 	{KEY_VOLUMEUP,		-1, 1, "vol_up",	EV_KEY, 0, 20},
 	{KEY_VOLUMEDOWN,	-1, 1, "vol_down",	EV_KEY, 0, 20},
+	{KEY_MUTE,		-1, 1, "mute_enable",	EV_KEY, 0, 20},
+	{KEY_VOLUMEUP,		-1, 1, "volume_up",	EV_KEY, 0, 20},
+	{KEY_VOLUMEDOWN,	-1, 1, "volume_down",	EV_KEY, 0, 20},
 	{KEY_CAMERA,		-1, 1, "camera_full",	EV_KEY, 0, 20},
 	{KEY_CAMERA_FOCUS,	-1, 1, "camera_half",	EV_KEY, 0, 20},
 	{SW_KEYPAD_SLIDE,	-1, 1, "MagSw1",	EV_SW,  0, 20},
arch/x86/platform/intel-mid/device_libs/platform_ipc.c deleted +0 -68

68 lines not on this page · raw message

arch/x86/platform/intel-mid/device_libs/platform_ipc.h deleted +0 -18
deleted file mode 100644
index 79bb09d4f718..000000000000
@@ -1,18 +0,0 @@
-/*
- * platform_ipc.h: IPC platform library header file
- *
- * (C) Copyright 2013 Intel Corporation
- * Author: Sathyanarayanan Kuppuswamy <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; version 2
- * of the License.
- */
-#ifndef _PLATFORM_IPC_H_
-#define _PLATFORM_IPC_H_
-
-void __init
-ipc_device_handler(struct sfi_device_table_entry *pentry, struct devs_id *dev);
-
-#endif
arch/x86/platform/intel-mid/device_libs/platform_mrfld_rtc.c new file +48 -0

48 lines not on this page · raw message

arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c +6 -6
index 3f1f1c77d090..86edd1e941eb 100644
@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = {
 
 static int tangier_probe(struct platform_device *pdev)
 {
-	int gsi;
 	struct irq_alloc_info info;
 	struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
+	int gsi, irq;
 
 	if (!pdata)
 		return -EINVAL;
@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev)
 	/* IOAPIC builds identity mapping between GSI and IRQ on MID */
 	gsi = pdata->irq;
 	ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
-	if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
-		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
-			 gsi);
-		return -EINVAL;
+	irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
+	if (irq < 0) {
+		dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
+		return irq;
 	}
 
 	return 0;
@@ -82,4 +82,4 @@ static int __init register_mid_wdt(void)
 
 	return 0;
 }
-rootfs_initcall(register_mid_wdt);
+arch_initcall(register_mid_wdt);
arch/x86/platform/intel-mid/device_libs/platform_msic_audio.c +1 -2
index cb3490ecb341..d4dc744dd5a5 100644
@@ -20,7 +20,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void *msic_audio_platform_data(void *info)
 {
@@ -40,8 +39,8 @@ static const struct devs_id msic_audio_dev_id __initconst = {
 	.name = "msic_audio",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_audio_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_audio_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_msic_battery.c +1 -2
index 4f72193939a6..5c3e9919633f 100644
@@ -19,7 +19,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void __init *msic_battery_platform_data(void *info)
 {
@@ -30,8 +29,8 @@ static const struct devs_id msic_battery_dev_id __initconst = {
 	.name = "msic_battery",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_battery_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_battery_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_msic_gpio.c +1 -2
index 70de5b531ba0..9fdb88d460d7 100644
@@ -20,7 +20,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void __init *msic_gpio_platform_data(void *info)
 {
@@ -41,8 +40,8 @@ static const struct devs_id msic_gpio_dev_id __initconst = {
 	.name = "msic_gpio",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_gpio_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_gpio_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_msic_ocd.c +1 -2
index 3d7c2011b6cf..7ae37cdbf256 100644
@@ -20,7 +20,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void __init *msic_ocd_platform_data(void *info)
 {
@@ -42,8 +41,8 @@ static const struct devs_id msic_ocd_dev_id __initconst = {
 	.name = "msic_ocd",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_ocd_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_ocd_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_msic_power_btn.c +1 -2
index 038f618fbc52..96809b98cf69 100644
@@ -18,7 +18,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void __init *msic_power_btn_platform_data(void *info)
 {
@@ -29,8 +28,8 @@ static const struct devs_id msic_power_btn_dev_id __initconst = {
 	.name = "msic_power_btn",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_power_btn_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_power_btn_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_msic_thermal.c +1 -2
index 114a5755b1e4..3e4167d246cd 100644
@@ -19,7 +19,6 @@
 #include <asm/intel-mid.h>
 
 #include "platform_msic.h"
-#include "platform_ipc.h"
 
 static void __init *msic_thermal_platform_data(void *info)
 {
@@ -30,8 +29,8 @@ static const struct devs_id msic_thermal_dev_id __initconst = {
 	.name = "msic_thermal",
 	.type = SFI_DEV_TYPE_IPC,
 	.delay = 1,
+	.msic = 1,
 	.get_platform_data = &msic_thermal_platform_data,
-	.device_handler = &ipc_device_handler,
 };
 
 sfi_device(msic_thermal_dev_id);
arch/x86/platform/intel-mid/device_libs/platform_pmic_gpio.c deleted +0 -54

54 lines not on this page · raw message

arch/x86/platform/intel-mid/mrfld.c +1 -0
index e0607c77a1bd..ae7bdeb0e507 100644
@@ -91,6 +91,7 @@ static unsigned long __init tangier_calibrate_tsc(void)
 static void __init tangier_arch_setup(void)
 {
 	x86_platform.calibrate_tsc = tangier_calibrate_tsc;
+	x86_platform.legacy.rtc = 1;
 }
 
 /* tangier arch ops */
arch/x86/platform/intel-mid/sfi.c +34 -24

92 lines not on this page · raw message

arch/x86/platform/uv/uv_nmi.c +400 -59

688 lines not on this page · raw message

drivers/platform/x86/Kconfig +0 -7
index 59aa8e302bc3..49a594855f98 100644
@@ -816,13 +816,6 @@ config INTEL_SCU_IPC_UTIL
 	  low level access for debug work and updating the firmware. Say
 	  N unless you will be doing this on an Intel MID platform.
 
-config GPIO_INTEL_PMIC
-	bool "Intel PMIC GPIO support"
-	depends on INTEL_SCU_IPC && GPIOLIB
-	---help---
-	  Say Y here to support GPIO via the SCU IPC interface
-	  on Intel MID platforms.
-
 config INTEL_MID_POWER_BUTTON
 	tristate "power button driver for Intel MID platforms"
 	depends on INTEL_SCU_IPC && INPUT
drivers/platform/x86/Makefile +0 -1
index d4111f0f8a78..b2f52a7690af 100644
@@ -50,7 +50,6 @@ obj-$(CONFIG_INTEL_SCU_IPC)	+= intel_scu_ipc.o
 obj-$(CONFIG_INTEL_SCU_IPC_UTIL) += intel_scu_ipcutil.o
 obj-$(CONFIG_INTEL_MFLD_THERMAL) += intel_mid_thermal.o
 obj-$(CONFIG_INTEL_IPS)		+= intel_ips.o
-obj-$(CONFIG_GPIO_INTEL_PMIC)	+= intel_pmic_gpio.o
 obj-$(CONFIG_XO1_RFKILL)	+= xo1-rfkill.o
 obj-$(CONFIG_XO15_EBOOK)	+= xo15-ebook.o
 obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
drivers/platform/x86/intel_pmic_gpio.c deleted +0 -326

326 lines not on this page · raw message

include/linux/intel_pmic_gpio.h deleted +0 -15
deleted file mode 100644
index 920109a29191..000000000000
@@ -1,15 +0,0 @@
-#ifndef LINUX_INTEL_PMIC_H
-#define LINUX_INTEL_PMIC_H
-
-struct intel_pmic_gpio_platform_data {
-	/* the first IRQ of the chip */
-	unsigned	irq_base;
-	/* number assigned to the first GPIO */
-	unsigned	gpio_base;
-	/* sram address for gpiointr register, the langwell chip will map
-	 * the PMIC spi GPIO expander's GPIOINTR register in sram.
-	 */
-	unsigned	gpiointr;
-};
-
-#endif
#1 lore raw
Quoted 6 lines · Ingo Molnar

Mike Travis (2):

     [...]

[email protected] (8):

     [...]

Btw, can you be a bit more careful when applying patches to make sure that the name and email address is actually good?

This seems to be due to some screw-up on Mike's part, since the original email seems to have this crap in the headers:

From: "'Mike Travis" <[email protected]>, '@sgi.com

which should never have worked but Mike apparently screwed up some script, and mail transport generally has a "let any crap through" tendency, but I would have hoped that people who commit these things actually react to how bad the end result is.

Mike, please fix whatever braindamage your mail sending model has.

But Ingo and Thomas (I see both of you committing those broken patches), please also look at what downstream sends you, and catch it early rather than have crap authorship information.

Linus

#2 lore raw
Quoted 10 lines · Linus Torvalds
Quoted 6 lines · Ingo Molnar

Mike Travis (2):

     [...]

[email protected] (8):

     [...]

Btw, can you be a bit more careful when applying patches to make sure that the name and email address is actually good?

Yes, will be more careful, sorry about that!

Quoted 4 lines

This seems to be due to some screw-up on Mike's part, since the original email seems to have this crap in the headers:

From: "'Mike Travis" <[email protected]>, '@sgi.com

Yeah, that's god-awful ugly - I should have caught it at the latest when looking over the shortlog so there's really no excuse for missing it ...

Quoted 10 lines

which should never have worked but Mike apparently screwed up some script, and mail transport generally has a "let any crap through" tendency, but I would have hoped that people who commit these things actually react to how bad the end result is.

Mike, please fix whatever braindamage your mail sending model has.

But Ingo and Thomas (I see both of you committing those broken patches), please also look at what downstream sends you, and catch it early rather than have crap authorship information.

Yeah.

Thanks,

Ingo