linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2011-03-24  2:48 Stephen Rothwell
  2011-03-24  2:52 ` Matthew Garrett
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2011-03-24  2:48 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-next, linux-kernel, Andrew Morton, Mattia Dongili

Hi Matthew,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/sony-laptop.c between commit bb7ca747f8d6
("backlight: add backlight type") from Linus' tree and commit
8a217a64f01c ("sony-laptop: implement new backlight control method") from
the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/sony-laptop.c
index 13d8d63,b4834fd..0000000
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@@ -1245,6 -1351,208 +1351,209 @@@ out_no_enum
  	return;
  }
  
+ /* Keyboard backlight feature */
+ #define KBDBL_HANDLER	0x137
+ #define KBDBL_PRESENT	0xB00
+ #define	SET_MODE	0xC00
+ #define SET_TIMEOUT	0xE00
+ 
+ struct kbd_backlight {
+ 	int mode;
+ 	int timeout;
+ 	struct device_attribute mode_attr;
+ 	struct device_attribute timeout_attr;
+ };
+ 
+ static struct kbd_backlight *kbdbl_handle;
+ 
+ static ssize_t __sony_nc_kbd_backlight_mode_set(u8 value)
+ {
+ 	int result;
+ 
+ 	if (value > 1)
+ 		return -EINVAL;
+ 
+ 	if (sony_call_snc_handle(KBDBL_HANDLER,
+ 				(value << 0x10) | SET_MODE, &result))
+ 		return -EIO;
+ 
+ 	kbdbl_handle->mode = value;
+ 
+ 	return 0;
+ }
+ 
+ static ssize_t sony_nc_kbd_backlight_mode_store(struct device *dev,
+ 		struct device_attribute *attr,
+ 		const char *buffer, size_t count)
+ {
+ 	int ret = 0;
+ 	unsigned long value;
+ 
+ 	if (count > 31)
+ 		return -EINVAL;
+ 
+ 	if (strict_strtoul(buffer, 10, &value))
+ 		return -EINVAL;
+ 
+ 	ret = __sony_nc_kbd_backlight_mode_set(value);
+ 	if (ret < 0)
+ 		return ret;
+ 
+ 	return count;
+ }
+ 
+ static ssize_t sony_nc_kbd_backlight_mode_show(struct device *dev,
+ 		struct device_attribute *attr, char *buffer)
+ {
+ 	ssize_t count = 0;
+ 	count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_handle->mode);
+ 	return count;
+ }
+ 
+ static int __sony_nc_kbd_backlight_timeout_set(u8 value)
+ {
+ 	int result;
+ 
+ 	if (value > 3)
+ 		return -EINVAL;
+ 
+ 	if (sony_call_snc_handle(KBDBL_HANDLER,
+ 				(value << 0x10) | SET_TIMEOUT, &result))
+ 		return -EIO;
+ 
+ 	kbdbl_handle->timeout = value;
+ 
+ 	return 0;
+ }
+ 
+ static ssize_t sony_nc_kbd_backlight_timeout_store(struct device *dev,
+ 		struct device_attribute *attr,
+ 		const char *buffer, size_t count)
+ {
+ 	int ret = 0;
+ 	unsigned long value;
+ 
+ 	if (count > 31)
+ 		return -EINVAL;
+ 
+ 	if (strict_strtoul(buffer, 10, &value))
+ 		return -EINVAL;
+ 
+ 	ret = __sony_nc_kbd_backlight_timeout_set(value);
+ 	if (ret < 0)
+ 		return ret;
+ 
+ 	return count;
+ }
+ 
+ static ssize_t sony_nc_kbd_backlight_timeout_show(struct device *dev,
+ 		struct device_attribute *attr, char *buffer)
+ {
+ 	ssize_t count = 0;
+ 	count = snprintf(buffer, PAGE_SIZE, "%d\n", kbdbl_handle->timeout);
+ 	return count;
+ }
+ 
+ static int sony_nc_kbd_backlight_setup(struct platform_device *pd)
+ {
+ 	int result;
+ 
+ 	if (sony_call_snc_handle(0x137, KBDBL_PRESENT, &result))
+ 		return 0;
+ 	if (!(result & 0x02))
+ 		return 0;
+ 
+ 	kbdbl_handle = kzalloc(sizeof(*kbdbl_handle), GFP_KERNEL);
+ 	if (!kbdbl_handle)
+ 		return -ENOMEM;
+ 
+ 	sysfs_attr_init(&kbdbl_handle->mode_attr.attr);
+ 	kbdbl_handle->mode_attr.attr.name = "kbd_backlight";
+ 	kbdbl_handle->mode_attr.attr.mode = S_IRUGO | S_IWUSR;
+ 	kbdbl_handle->mode_attr.show = sony_nc_kbd_backlight_mode_show;
+ 	kbdbl_handle->mode_attr.store = sony_nc_kbd_backlight_mode_store;
+ 
+ 	sysfs_attr_init(&kbdbl_handle->timeout_attr.attr);
+ 	kbdbl_handle->timeout_attr.attr.name = "kbd_backlight_timeout";
+ 	kbdbl_handle->timeout_attr.attr.mode = S_IRUGO | S_IWUSR;
+ 	kbdbl_handle->timeout_attr.show = sony_nc_kbd_backlight_timeout_show;
+ 	kbdbl_handle->timeout_attr.store = sony_nc_kbd_backlight_timeout_store;
+ 
+ 	if (device_create_file(&pd->dev, &kbdbl_handle->mode_attr))
+ 		goto outkzalloc;
+ 
+ 	if (device_create_file(&pd->dev, &kbdbl_handle->timeout_attr))
+ 		goto outmode;
+ 
+ 	__sony_nc_kbd_backlight_mode_set(kbd_backlight);
+ 	__sony_nc_kbd_backlight_timeout_set(kbd_backlight_timeout);
+ 
+ 	return 0;
+ 
+ outmode:
+ 	device_remove_file(&pd->dev, &kbdbl_handle->mode_attr);
+ outkzalloc:
+ 	kfree(kbdbl_handle);
+ 	kbdbl_handle = NULL;
+ 	return -1;
+ }
+ 
+ static int sony_nc_kbd_backlight_cleanup(struct platform_device *pd)
+ {
+ 	if (kbdbl_handle) {
+ 		device_remove_file(&pd->dev, &kbdbl_handle->mode_attr);
+ 		device_remove_file(&pd->dev, &kbdbl_handle->timeout_attr);
+ 		kfree(kbdbl_handle);
+ 	}
+ 	return 0;
+ }
+ 
+ static void sony_nc_backlight_setup(void)
+ {
+ 	acpi_handle unused;
+ 	int max_brightness = 0;
+ 	const struct backlight_ops *ops = NULL;
+ 	struct backlight_properties props;
+ 
+ 	if (sony_find_snc_handle(0x12f) != -1) {
+ 		backlight_ng_handle = 0x12f;
+ 		ops = &sony_backlight_ng_ops;
+ 		max_brightness = 0xff;
+ 
+ 	} else if (sony_find_snc_handle(0x137) != -1) {
+ 		backlight_ng_handle = 0x137;
+ 		ops = &sony_backlight_ng_ops;
+ 		max_brightness = 0xff;
+ 
+ 	} else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT",
+ 						&unused))) {
+ 		ops = &sony_backlight_ops;
+ 		max_brightness = SONY_MAX_BRIGHTNESS - 1;
+ 
+ 	} else
+ 		return;
+ 
+ 	memset(&props, 0, sizeof(struct backlight_properties));
++	props.type = BACKLIGHT_PLATFORM;
+ 	props.max_brightness = max_brightness;
+ 	sony_backlight_device = backlight_device_register("sony", NULL,
+ 							  &backlight_ng_handle,
+ 							  ops, &props);
+ 
+ 	if (IS_ERR(sony_backlight_device)) {
+ 		pr_warning(DRV_PFX "unable to register backlight device\n");
+ 		sony_backlight_device = NULL;
+ 	} else
+ 		sony_backlight_device->props.brightness =
+ 		    ops->get_brightness(sony_backlight_device);
+ }
+ 
+ static void sony_nc_backlight_cleanup(void)
+ {
+ 	if (sony_backlight_device)
+ 		backlight_device_unregister(sony_backlight_device);
+ }
+ 
  static int sony_nc_add(struct acpi_device *device)
  {
  	acpi_status status;

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the drivers-x86 tree with Linus' tree
  2011-03-24  2:48 linux-next: manual merge of the drivers-x86 tree with Linus' tree Stephen Rothwell
@ 2011-03-24  2:52 ` Matthew Garrett
  0 siblings, 0 replies; 16+ messages in thread
From: Matthew Garrett @ 2011-03-24  2:52 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Andrew Morton, Mattia Dongili

Thanks, I'll review and merge here in the morning.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2024-03-08  2:34 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2024-03-08  2:34 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross
  Cc: Armin Wolf, Ilpo Järvinen, Linux Kernel Mailing List,
	Linux Next Mailing List, Mario Limonciello, Shyam Sundar S K

[-- Attachment #1: Type: text/plain, Size: 4179 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/amd/pmf/tee-if.c

between commits:

  3da01394c0f7 ("platform/x86/amd/pmf: Remove smart_pc_status enum")
  20545af302bb ("platform/x86/amd/pmf: Add debugging message for missing policy data")
  e70961505808 ("platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()")

from Linus' tree and commits:

  6ed210504a18 ("platform/x86/amd/pmf: Add missing __iomem attribute to policy_base")
  98cfcece0ab8 ("platform/x86/amd/pmf: Fix return value of amd_pmf_start_policy_engine()")
  a87d92223084 ("platform/x86/amd/pmf: Use struct for cookie header")
  1e7a14ee259e ("platform/x86/amd/pmf: Fix possible out-of-bound memory accesses")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/amd/pmf/tee-if.c
index dcbe8f85e122,75370431a82e..000000000000
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@@ -246,19 -246,22 +246,24 @@@ static void amd_pmf_invoke_cmd(struct w
  
  static int amd_pmf_start_policy_engine(struct amd_pmf_dev *dev)
  {
- 	u32 cookie, length;
+ 	struct cookie_header *header;
  	int res;
  
- 	cookie = readl(dev->policy_buf + POLICY_COOKIE_OFFSET);
- 	length = readl(dev->policy_buf + POLICY_COOKIE_LEN);
+ 	if (dev->policy_sz < POLICY_COOKIE_OFFSET + sizeof(*header))
+ 		return -EINVAL;
  
- 	if (cookie != POLICY_SIGN_COOKIE || !length) {
+ 	header = (struct cookie_header *)(dev->policy_buf + POLICY_COOKIE_OFFSET);
+ 
 -	if (header->sign != POLICY_SIGN_COOKIE || !header->length)
++	if (header->sign != POLICY_SIGN_COOKIE || !header->length) {
 +		dev_dbg(dev->dev, "cookie doesn't match\n");
  		return -EINVAL;
 +	}
  
+ 	if (dev->policy_sz < header->length + 512)
+ 		return -EINVAL;
+ 
  	/* Update the actual length */
- 	dev->policy_sz = length + 512;
+ 	dev->policy_sz = header->length + 512;
  	res = amd_pmf_invoke_cmd_init(dev);
  	if (res == TA_PMF_TYPE_SUCCESS) {
  		/* Now its safe to announce that smart pc is enabled */
@@@ -270,8 -273,8 +275,8 @@@
  		schedule_delayed_work(&dev->pb_work, msecs_to_jiffies(pb_actions_ms * 3));
  	} else {
  		dev_err(dev->dev, "ta invoke cmd init failed err: %x\n", res);
 -		dev->smart_pc_enabled = PMF_SMART_PC_DISABLED;
 +		dev->smart_pc_enabled = false;
- 		return res;
+ 		return -EIO;
  	}
  
  	return 0;
@@@ -436,46 -458,13 +441,46 @@@ int amd_pmf_init_smart_pc(struct amd_pm
  		return ret;
  
  	INIT_DELAYED_WORK(&dev->pb_work, amd_pmf_invoke_cmd);
 -	amd_pmf_set_dram_addr(dev, true);
 -	amd_pmf_get_bios_buffer(dev);
 -	dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
 -	if (!dev->prev_data)
 -		return -ENOMEM;
  
 -	return dev->smart_pc_enabled;
 +	ret = amd_pmf_set_dram_addr(dev, true);
 +	if (ret)
 +		goto error;
 +
 +	dev->policy_base = devm_ioremap(dev->dev, dev->policy_addr, dev->policy_sz);
 +	if (!dev->policy_base) {
 +		ret = -ENOMEM;
 +		goto error;
 +	}
 +
 +	dev->policy_buf = kzalloc(dev->policy_sz, GFP_KERNEL);
 +	if (!dev->policy_buf) {
 +		ret = -ENOMEM;
 +		goto error;
 +	}
 +
- 	memcpy(dev->policy_buf, dev->policy_base, dev->policy_sz);
++	memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
 +
 +	amd_pmf_hex_dump_pb(dev);
 +
 +	dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
 +	if (!dev->prev_data) {
 +		ret = -ENOMEM;
 +		goto error;
 +	}
 +
 +	ret = amd_pmf_start_policy_engine(dev);
 +	if (ret)
 +		goto error;
 +
 +	if (pb_side_load)
 +		amd_pmf_open_pb(dev, dev->dbgfs_dir);
 +
 +	return 0;
 +
 +error:
 +	amd_pmf_deinit_smart_pc(dev);
 +
 +	return ret;
  }
  
  void amd_pmf_deinit_smart_pc(struct amd_pmf_dev *dev)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2024-03-08  2:19 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2024-03-08  2:19 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross
  Cc: Ilpo Järvinen, Linux Kernel Mailing List,
	Linux Next Mailing List, Patil Rajesh Reddy, Shyam Sundar S K

[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/amd/pmf/core.c

between commit:

  11e298f3548a ("platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume")

from Linus' tree and commit:

  6eacd474b8be ("platform/x86/amd/pmf: Add support to notify sbios heart beat event")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/amd/pmf/core.c
index 4f734e049f4a,53c0f61e5c5f..000000000000
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@@ -296,9 -297,11 +297,12 @@@ static int amd_pmf_suspend_handler(stru
  {
  	struct amd_pmf_dev *pdev = dev_get_drvdata(dev);
  
 -	kfree(pdev->buf);
 +	if (pdev->smart_pc_enabled)
 +		cancel_delayed_work_sync(&pdev->pb_work);
  
+ 	if (is_apmf_func_supported(pdev, APMF_FUNC_SBIOS_HEARTBEAT_V2))
+ 		amd_pmf_notify_sbios_heartbeat_event_v2(pdev, ON_SUSPEND);
+ 
  	return 0;
  }
  
@@@ -313,9 -316,9 +317,12 @@@ static int amd_pmf_resume_handler(struc
  			return ret;
  	}
  
+ 	if (is_apmf_func_supported(pdev, APMF_FUNC_SBIOS_HEARTBEAT_V2))
+ 		amd_pmf_notify_sbios_heartbeat_event_v2(pdev, ON_RESUME);
+ 
 +	if (pdev->smart_pc_enabled)
 +		schedule_delayed_work(&pdev->pb_work, msecs_to_jiffies(2000));
 +
  	return 0;
  }
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2024-03-01  3:14 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2024-03-01  3:14 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross
  Cc: Armin Wolf, Ilpo Järvinen, Linux Kernel Mailing List,
	Linux Next Mailing List, Mario Limonciello

[-- Attachment #1: Type: text/plain, Size: 2216 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/amd/pmf/tee-if.c

between commit:

  e70961505808 ("platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()")

from Linus' tree and commit:

  6ed210504a18 ("platform/x86/amd/pmf: Add missing __iomem attribute to policy_base")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/amd/pmf/tee-if.c
index 8527dca9cf56,16973bebf55f..000000000000
--- a/drivers/platform/x86/amd/pmf/tee-if.c
+++ b/drivers/platform/x86/amd/pmf/tee-if.c
@@@ -436,44 -453,13 +436,44 @@@ int amd_pmf_init_smart_pc(struct amd_pm
  		return ret;
  
  	INIT_DELAYED_WORK(&dev->pb_work, amd_pmf_invoke_cmd);
 -	amd_pmf_set_dram_addr(dev, true);
 -	amd_pmf_get_bios_buffer(dev);
 +
 +	ret = amd_pmf_set_dram_addr(dev, true);
 +	if (ret)
 +		goto error;
 +
 +	dev->policy_base = devm_ioremap(dev->dev, dev->policy_addr, dev->policy_sz);
 +	if (!dev->policy_base) {
 +		ret = -ENOMEM;
 +		goto error;
 +	}
 +
 +	dev->policy_buf = kzalloc(dev->policy_sz, GFP_KERNEL);
 +	if (!dev->policy_buf) {
 +		ret = -ENOMEM;
 +		goto error;
 +	}
 +
- 	memcpy(dev->policy_buf, dev->policy_base, dev->policy_sz);
++	memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
 +
 +	amd_pmf_hex_dump_pb(dev);
 +
  	dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
  	if (!dev->prev_data)
 -		return -ENOMEM;
 +		goto error;
  
 -	return dev->smart_pc_enabled;
 +	ret = amd_pmf_start_policy_engine(dev);
 +	if (ret)
 +		goto error;
 +
 +	if (pb_side_load)
 +		amd_pmf_open_pb(dev, dev->dbgfs_dir);
 +
 +	return 0;
 +
 +error:
 +	amd_pmf_deinit_smart_pc(dev);
 +
 +	return ret;
  }
  
  void amd_pmf_deinit_smart_pc(struct amd_pmf_dev *dev)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2024-02-08  1:57 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2024-02-08  1:57 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross
  Cc: Ricardo B. Marliere, Armin Wolf, Ilpo Järvinen,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3070 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/wmi.c

between commit:

  3ea7f59af8ff ("platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list")

from Linus' tree and commit:

  10fdfd13a359 ("platform: x86: wmi: make wmi_bus_type const")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/wmi.c
index 3c288e8f404b,5682c7de0394..000000000000
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@@ -221,18 -219,7 +221,18 @@@ static int wmidev_match_guid(struct dev
  	return 0;
  }
  
 +static int wmidev_match_notify_id(struct device *dev, const void *data)
 +{
 +	struct wmi_block *wblock = dev_to_wblock(dev);
 +	const u32 *notify_id = data;
 +
 +	if (wblock->gblock.flags & ACPI_WMI_EVENT && wblock->gblock.notify_id == *notify_id)
 +		return 1;
 +
 +	return 0;
 +}
 +
- static struct bus_type wmi_bus_type;
+ static const struct bus_type wmi_bus_type;
  
  static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
  {
@@@ -1233,20 -1179,30 +1233,19 @@@ static int wmi_notify_device(struct dev
  	if (!(wblock->gblock.flags & ACPI_WMI_EVENT && wblock->gblock.notify_id == *event))
  		return 0;
  
 -	/* If a driver is bound, then notify the driver. */
 -	if (test_bit(WMI_PROBED, &wblock->flags) && wblock->dev.dev.driver) {
 -		struct wmi_driver *driver = drv_to_wdrv(wblock->dev.dev.driver);
 -		struct acpi_buffer evdata = { ACPI_ALLOCATE_BUFFER, NULL };
 -		acpi_status status;
 -
 -		if (!driver->no_notify_data) {
 -			status = get_event_data(wblock, &evdata);
 -			if (ACPI_FAILURE(status)) {
 -				dev_warn(&wblock->dev.dev, "failed to get event data\n");
 -				return -EIO;
 -			}
 -		}
 -
 -		if (driver->notify)
 -			driver->notify(&wblock->dev, evdata.pointer);
 -
 -		kfree(evdata.pointer);
 -	} else if (wblock->handler) {
 -		/* Legacy handler */
 -		wblock->handler(*event, wblock->handler_data);
 +	down_read(&wblock->notify_lock);
 +	/* The WMI driver notify handler conflicts with the legacy WMI handler.
 +	 * Because of this the WMI driver notify handler takes precedence.
 +	 */
 +	if (wblock->dev.dev.driver && wblock->driver_ready) {
 +		wmi_notify_driver(wblock);
 +	} else {
 +		if (wblock->handler)
 +			wblock->handler(*event, wblock->handler_data);
  	}
 +	up_read(&wblock->notify_lock);
  
- 	acpi_bus_generate_netlink_event(wblock->acpi_device->pnp.device_class,
- 					dev_name(&wblock->dev.dev), *event, 0);
+ 	acpi_bus_generate_netlink_event("wmi", acpi_dev_name(wblock->acpi_device), *event, 0);
  
  	return -EBUSY;
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2024-01-02  2:30 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2024-01-02  2:30 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross
  Cc: David E. Box, Ilpo Järvinen, Linux Kernel Mailing List,
	Linux Next Mailing List, Rajvi Jingar, Xi Pardee

[-- Attachment #1: Type: text/plain, Size: 9577 bytes --]

Hi all,

FIXME: Add owner of second tree to To:
       Add author(s)/SOB of conflicting commits.

Today's linux-next merge of the drivers-x86 tree got conflicts in:

  drivers/platform/x86/intel/pmc/adl.c
  drivers/platform/x86/intel/pmc/cnp.c
  drivers/platform/x86/intel/pmc/core.h
  drivers/platform/x86/intel/pmc/mtl.c
  drivers/platform/x86/intel/pmc/tgl.c

between commits:

  6f9cc5c1f94d ("platform/x86/intel/pmc: Allow reenabling LTRs")
  70681aa0746a ("platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback")

from Linus' tree and commits:

  2e35e3aa9f10 ("platform/x86:intel/pmc: Call pmc_get_low_power_modes from platform init")
  4d621c3f02ba ("platform/x86/intel/pmc: Retrieve LPM information using Intel PMT")
  d79c3c82ee82 ("platform/x86/intel/pmc: Move common code to core.c")
  935b8211a31a ("platform/x86/intel/pmc: Read low power mode requirements for MTL-M and MTL-P")
  1d62ada48d41 ("platform/x86/intel/pmc: Add ssram_init flag in PMC discovery in Meteor Lake")
  544f7b7f651c ("platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/intel/pmc/adl.c
index 606f7678bcb0,882f2d5d8937..000000000000
--- a/drivers/platform/x86/intel/pmc/adl.c
+++ b/drivers/platform/x86/intel/pmc/adl.c
@@@ -322,5 -321,13 +324,7 @@@ int adl_core_init(struct pmc_dev *pmcde
  	if (ret)
  		return ret;
  
+ 	pmc_core_get_low_power_modes(pmcdev);
+ 
 -	/* Due to a hardware limitation, the GBE LTR blocks PC10
 -	 * when a cable is attached. Tell the PMC to ignore it.
 -	 */
 -	dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
 -	pmc_core_send_ltr_ignore(pmcdev, 3);
 -
  	return 0;
  }
diff --cc drivers/platform/x86/intel/pmc/cnp.c
index 98b36651201a,59298f184d0e..000000000000
--- a/drivers/platform/x86/intel/pmc/cnp.c
+++ b/drivers/platform/x86/intel/pmc/cnp.c
@@@ -234,5 -214,13 +234,7 @@@ int cnp_core_init(struct pmc_dev *pmcde
  	if (ret)
  		return ret;
  
+ 	pmc_core_get_low_power_modes(pmcdev);
+ 
 -	/* Due to a hardware limitation, the GBE LTR blocks PC10
 -	 * when a cable is attached. Tell the PMC to ignore it.
 -	 */
 -	dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
 -	pmc_core_send_ltr_ignore(pmcdev, 3);
 -
  	return 0;
  }
diff --cc drivers/platform/x86/intel/pmc/core.h
index b66dacbfb94b,2891d8d04fad..000000000000
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@@ -486,9 -511,61 +513,61 @@@ extern const struct pmc_bit_map mtl_ioe
  extern const struct pmc_bit_map mtl_ioem_vnn_req_status_1_map[];
  extern const struct pmc_bit_map *mtl_ioem_lpm_maps[];
  extern const struct pmc_reg_map mtl_ioem_reg_map;
+ extern const struct pmc_reg_map lnl_socm_reg_map;
+ 
+ /* LNL */
+ extern const struct pmc_bit_map lnl_ltr_show_map[];
+ extern const struct pmc_bit_map lnl_clocksource_status_map[];
+ extern const struct pmc_bit_map lnl_power_gating_status_0_map[];
+ extern const struct pmc_bit_map lnl_power_gating_status_1_map[];
+ extern const struct pmc_bit_map lnl_power_gating_status_2_map[];
+ extern const struct pmc_bit_map lnl_d3_status_0_map[];
+ extern const struct pmc_bit_map lnl_d3_status_1_map[];
+ extern const struct pmc_bit_map lnl_d3_status_2_map[];
+ extern const struct pmc_bit_map lnl_d3_status_3_map[];
+ extern const struct pmc_bit_map lnl_vnn_req_status_0_map[];
+ extern const struct pmc_bit_map lnl_vnn_req_status_1_map[];
+ extern const struct pmc_bit_map lnl_vnn_req_status_2_map[];
+ extern const struct pmc_bit_map lnl_vnn_req_status_3_map[];
+ extern const struct pmc_bit_map lnl_vnn_misc_status_map[];
+ extern const struct pmc_bit_map *lnl_lpm_maps[];
+ extern const struct pmc_bit_map lnl_pfear_map[];
+ extern const struct pmc_bit_map *ext_lnl_pfear_map[];
+ 
+ /* ARL */
+ extern const struct pmc_bit_map arl_socs_ltr_show_map[];
+ extern const struct pmc_bit_map arl_socs_clocksource_status_map[];
+ extern const struct pmc_bit_map arl_socs_power_gating_status_0_map[];
+ extern const struct pmc_bit_map arl_socs_power_gating_status_1_map[];
+ extern const struct pmc_bit_map arl_socs_power_gating_status_2_map[];
+ extern const struct pmc_bit_map arl_socs_d3_status_2_map[];
+ extern const struct pmc_bit_map arl_socs_d3_status_3_map[];
+ extern const struct pmc_bit_map arl_socs_vnn_req_status_3_map[];
+ extern const struct pmc_bit_map *arl_socs_lpm_maps[];
+ extern const struct pmc_bit_map arl_socs_pfear_map[];
+ extern const struct pmc_bit_map *ext_arl_socs_pfear_map[];
+ extern const struct pmc_reg_map arl_socs_reg_map;
+ extern const struct pmc_bit_map arl_pchs_ltr_show_map[];
+ extern const struct pmc_bit_map arl_pchs_clocksource_status_map[];
+ extern const struct pmc_bit_map arl_pchs_power_gating_status_0_map[];
+ extern const struct pmc_bit_map arl_pchs_power_gating_status_1_map[];
+ extern const struct pmc_bit_map arl_pchs_power_gating_status_2_map[];
+ extern const struct pmc_bit_map arl_pchs_d3_status_0_map[];
+ extern const struct pmc_bit_map arl_pchs_d3_status_1_map[];
+ extern const struct pmc_bit_map arl_pchs_d3_status_2_map[];
+ extern const struct pmc_bit_map arl_pchs_d3_status_3_map[];
+ extern const struct pmc_bit_map arl_pchs_vnn_req_status_0_map[];
+ extern const struct pmc_bit_map arl_pchs_vnn_req_status_1_map[];
+ extern const struct pmc_bit_map arl_pchs_vnn_req_status_2_map[];
+ extern const struct pmc_bit_map arl_pchs_vnn_req_status_3_map[];
+ extern const struct pmc_bit_map arl_pchs_vnn_misc_status_map[];
+ extern const struct pmc_bit_map arl_pchs_signal_status_map[];
+ extern const struct pmc_bit_map *arl_pchs_lpm_maps[];
+ extern const struct pmc_reg_map arl_pchs_reg_map;
  
  extern void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev);
+ extern int pmc_core_ssram_get_lpm_reqs(struct pmc_dev *pmcdev);
 -extern int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value);
 +int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value, int ignore);
  
  int pmc_core_resume_common(struct pmc_dev *pmcdev);
  int get_primary_reg_base(struct pmc *pmc);
@@@ -499,12 -579,13 +581,16 @@@ int spt_core_init(struct pmc_dev *pmcde
  int cnp_core_init(struct pmc_dev *pmcdev);
  int icl_core_init(struct pmc_dev *pmcdev);
  int tgl_core_init(struct pmc_dev *pmcdev);
+ int tgl_l_core_init(struct pmc_dev *pmcdev);
+ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp);
  int adl_core_init(struct pmc_dev *pmcdev);
  int mtl_core_init(struct pmc_dev *pmcdev);
+ int arl_core_init(struct pmc_dev *pmcdev);
+ int lnl_core_init(struct pmc_dev *pmcdev);
  
 +void cnl_suspend(struct pmc_dev *pmcdev);
 +int cnl_resume(struct pmc_dev *pmcdev);
 +
  #define pmc_for_each_mode(i, mode, pmcdev)		\
  	for (i = 0, mode = pmcdev->lpm_en_modes[i];	\
  	     i < pmcdev->num_lpm_modes;			\
diff --cc drivers/platform/x86/intel/pmc/mtl.c
index 504e3e273c32,e75431325dda..000000000000
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@@ -991,19 -998,35 +1000,30 @@@ int mtl_core_init(struct pmc_dev *pmcde
  
  	mtl_d3_fixup();
  
 +	pmcdev->suspend = cnl_suspend;
  	pmcdev->resume = mtl_resume;
- 
  	pmcdev->regmap_list = mtl_pmc_info_list;
- 	pmc_core_ssram_init(pmcdev);
  
- 	/* If regbase not assigned, set map and discover using legacy method */
- 	if (!pmc->regbase) {
+ 	/*
+ 	 * If ssram init fails use legacy method to at least get the
+ 	 * primary PMC
+ 	 */
+ 	ret = pmc_core_ssram_init(pmcdev, func);
+ 	if (ret) {
+ 		ssram_init = false;
+ 		dev_warn(&pmcdev->pdev->dev,
+ 			 "ssram init failed, %d, using legacy init\n", ret);
  		pmc->map = &mtl_socm_reg_map;
  		ret = get_primary_reg_base(pmc);
  		if (ret)
  			return ret;
  	}
  
+ 	pmc_core_get_low_power_modes(pmcdev);
+ 	pmc_core_punit_pmt_init(pmcdev, MTL_PMT_DMU_GUID);
+ 
 -	/* Due to a hardware limitation, the GBE LTR blocks PC10
 -	 * when a cable is attached. Tell the PMC to ignore it.
 -	 */
 -	dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
 -	pmc_core_send_ltr_ignore(pmcdev, 3);
 -
+ 	if (ssram_init)
+ 		return pmc_core_ssram_get_lpm_reqs(pmcdev);
+ 
  	return 0;
  }
diff --cc drivers/platform/x86/intel/pmc/tgl.c
index e88d3d00c853,91fd725951e5..000000000000
--- a/drivers/platform/x86/intel/pmc/tgl.c
+++ b/drivers/platform/x86/intel/pmc/tgl.c
@@@ -258,16 -300,22 +300,20 @@@ int tgl_core_generic_init(struct pmc_de
  	struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
  	int ret;
  
- 	pmc->map = &tgl_reg_map;
+ 	if (pch_tp == PCH_H)
+ 		pmc->map = &tgl_h_reg_map;
+ 	else
+ 		pmc->map = &tgl_reg_map;
  
 +	pmcdev->suspend = cnl_suspend;
 +	pmcdev->resume = cnl_resume;
 +
  	ret = get_primary_reg_base(pmc);
  	if (ret)
  		return ret;
  
+ 	pmc_core_get_low_power_modes(pmcdev);
  	pmc_core_get_tgl_lpm_reqs(pmcdev->pdev);
 -	/* Due to a hardware limitation, the GBE LTR blocks PC10
 -	 * when a cable is attached. Tell the PMC to ignore it.
 -	 */
 -	dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
 -	pmc_core_send_ltr_ignore(pmcdev, 3);
  
  	return 0;
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the drivers-x86 tree with Linus' tree
  2018-10-29  3:29 Stephen Rothwell
@ 2018-10-29  9:34 ` Andy Shevchenko
  0 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2018-10-29  9:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Darren Hart, linux-next, Linux Kernel Mailing List,
	Peter Zijlstra (Intel),
	Ingo Molnar

On Mon, Oct 29, 2018 at 5:29 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the drivers-x86 tree got a conflict in:
>
>   drivers/platform/x86/intel_telemetry_debugfs.c
>
> between commit:
>
>   f2c4db1bd807 ("x86/cpu: Sanitize FAM6_ATOM naming")
>
> from Linus' tree and commit:
>
>   1a7938a632ce ("platform/x86: intel_telemetry: Get rid of custom macro")
>
> from the drivers-x86 tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Thanks!
This looks correct to me.

>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/platform/x86/intel_telemetry_debugfs.c
> index cee08f236292,30988e31c713..000000000000
> --- a/drivers/platform/x86/intel_telemetry_debugfs.c
> +++ b/drivers/platform/x86/intel_telemetry_debugfs.c
> @@@ -319,8 -308,8 +308,8 @@@ static struct telemetry_debugfs_conf te
>   };
>
>   static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
> -       TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
> -       TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT_PLUS, telem_apl_debugfs_conf),
> +       INTEL_CPU_FAM6(ATOM_GOLDMONT, telem_apl_debugfs_conf),
>  -      INTEL_CPU_FAM6(ATOM_GEMINI_LAKE, telem_apl_debugfs_conf),
> ++      INTEL_CPU_FAM6(ATOM_GOLDMONT_PLUS, telem_apl_debugfs_conf),
>         {}
>   };
>


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2018-10-29  3:29 Stephen Rothwell
  2018-10-29  9:34 ` Andy Shevchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2018-10-29  3:29 UTC (permalink / raw)
  To: Darren Hart, Andy Shevchenko
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Peter Zijlstra, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]

Hi all,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/intel_telemetry_debugfs.c

between commit:

  f2c4db1bd807 ("x86/cpu: Sanitize FAM6_ATOM naming")

from Linus' tree and commit:

  1a7938a632ce ("platform/x86: intel_telemetry: Get rid of custom macro")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/platform/x86/intel_telemetry_debugfs.c
index cee08f236292,30988e31c713..000000000000
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@@ -319,8 -308,8 +308,8 @@@ static struct telemetry_debugfs_conf te
  };
  
  static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
- 	TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
- 	TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT_PLUS, telem_apl_debugfs_conf),
+ 	INTEL_CPU_FAM6(ATOM_GOLDMONT, telem_apl_debugfs_conf),
 -	INTEL_CPU_FAM6(ATOM_GEMINI_LAKE, telem_apl_debugfs_conf),
++	INTEL_CPU_FAM6(ATOM_GOLDMONT_PLUS, telem_apl_debugfs_conf),
  	{}
  };
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2016-01-15  1:56 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2016-01-15  1:56 UTC (permalink / raw)
  To: Darren Hart
  Cc: linux-next, linux-kernel, Hans de Goede, Rafael J. Wysocki,
	Pali Rohár

Hi Darren,

Today's linux-next merge of the drivers-x86 tree got a conflict in:

  drivers/platform/x86/dell-wmi.c

between commit:

  61679c725553 ("dell-wmi: Use acpi_video_handles_brightness_key_presses()")

from Linus' tree and commit:

  6129570931b8 ("dell-wmi: Check if Dell WMI descriptor structure is valid")

from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/dell-wmi.c
index cb8a9c2a3a1f,5db9efbde5b9..000000000000
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@@ -42,8 -44,13 +44,12 @@@ MODULE_DESCRIPTION("Dell laptop WMI hot
  MODULE_LICENSE("GPL");
  
  #define DELL_EVENT_GUID "9DBB5994-A997-11DA-B012-B622A1EF5492"
+ #define DELL_DESCRIPTOR_GUID "8D9DDCBC-A997-11DA-B012-B622A1EF5492"
+ 
 -static int acpi_video;
+ static u32 dell_wmi_interface_version;
  
  MODULE_ALIAS("wmi:"DELL_EVENT_GUID);
+ MODULE_ALIAS("wmi:"DELL_DESCRIPTOR_GUID);
  
  /*
   * Certain keys are flagged as KE_IGNORE. All of these are either
@@@ -396,7 -520,12 +520,11 @@@ static int __init dell_wmi_init(void
  		return -ENODEV;
  	}
  
+ 	err = dell_wmi_check_descriptor_buffer();
+ 	if (err)
+ 		return err;
+ 
  	dmi_walk(find_hk_type, NULL);
 -	acpi_video = acpi_video_get_backlight_type() != acpi_backlight_vendor;
  
  	err = dell_wmi_input_setup();
  	if (err)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the drivers-x86 tree with Linus' tree
  2015-06-03  3:27 ` Darren Hart
@ 2015-06-03  4:04   ` Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2015-06-03  4:04 UTC (permalink / raw)
  To: Darren Hart; +Cc: Philippe Coval, linux-next, linux-kernel, Dmitry Tunin

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

Hi Darren,

On Tue, 2 Jun 2015 20:27:50 -0700 Darren Hart <dvhart@infradead.org> wrote:
>
> Thanks for the heads' up. This happens because my -next branch is based on *-rc1
> as I think was recommended at the last kernel summit. Since rc1 I sent Linus the
> G50-30, but by rc6 I didn't feel good about sending the similar G50-30 fix, so
> that is in my rc1 branch.
> 
> I am happy to rebase my -next on rc6 to avoid the conflict, but I believe the
> rebase is considered poor practice.

This is a fairly trivial conflict and Linus will have no trouble fixing
it up as well when he merges your tree in the next window

> You said no action required, but if there is something I can do to avoid this
> kind of manual effort on your part (and a manual merge by Linus in the upcoming
> merge window), I'm happy to update my process to accommodate.

This is fine.  git rerere remembers these conflict resolutions for me,
so I only have to fix them once (usually).

For a more complex conflict, you might consider merging the branch that
you had Linus merge (or a later -rc) with, of course, a nice
explanation in the merge commit message, but in this case that would be
overkill.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: linux-next: manual merge of the drivers-x86 tree with Linus' tree
  2015-06-02  6:07 Stephen Rothwell
@ 2015-06-03  3:27 ` Darren Hart
  2015-06-03  4:04   ` Stephen Rothwell
  0 siblings, 1 reply; 16+ messages in thread
From: Darren Hart @ 2015-06-03  3:27 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Philippe Coval, linux-next, linux-kernel, Dmitry Tunin

On Tue, Jun 02, 2015 at 04:07:23PM +1000, Stephen Rothwell wrote:
> Hi Darren,
> 
> Today's linux-next merge of the drivers-x86 tree got a conflict in
> drivers/platform/x86/ideapad-laptop.c between commit 9b071a43553d
> ("ideapad_laptop: Add Lenovo G40-30 to devices without radio switch")
> from Linus' tree and commit 4fa9dabcffc8 ("ideapad_laptop: Lenovo
> G50-30 fix rfkill reports wireless blocked") from the drivers-x86 tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

Thanks for the heads' up. This happens because my -next branch is based on *-rc1
as I think was recommended at the last kernel summit. Since rc1 I sent Linus the
G50-30, but by rc6 I didn't feel good about sending the similar G50-30 fix, so
that is in my rc1 branch.

I am happy to rebase my -next on rc6 to avoid the conflict, but I believe the
rebase is considered poor practice.

You said no action required, but if there is something I can do to avoid this
kind of manual effort on your part (and a manual merge by Linus in the upcoming
merge window), I'm happy to update my process to accommodate.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2015-06-02  6:07 Stephen Rothwell
  2015-06-03  3:27 ` Darren Hart
  0 siblings, 1 reply; 16+ messages in thread
From: Stephen Rothwell @ 2015-06-02  6:07 UTC (permalink / raw)
  To: Darren Hart, Philippe Coval; +Cc: linux-next, linux-kernel, Dmitry Tunin

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

Hi Darren,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/ideapad-laptop.c between commit 9b071a43553d
("ideapad_laptop: Add Lenovo G40-30 to devices without radio switch")
from Linus' tree and commit 4fa9dabcffc8 ("ideapad_laptop: Lenovo
G50-30 fix rfkill reports wireless blocked") from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/ideapad-laptop.c
index b496db87bc05,1db3d2176d56..000000000000
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@@ -830,13 -830,13 +830,20 @@@ static void ideapad_acpi_notify(acpi_ha
   */
  static const struct dmi_system_id no_hw_rfkill_list[] = {
  	{
 +		.ident = "Lenovo G40-30",
 +		.matches = {
 +			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
 +			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G40-30"),
 +		},
 +	},
 +	{
+ 		.ident = "Lenovo G50-30",
+ 		.matches = {
+ 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ 			DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo G50-30"),
+ 		},
+ 	},
+ 	{
  		.ident = "Lenovo Yoga 2 11 / 13 / Pro",
  		.matches = {
  			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2012-05-31  2:06 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2012-05-31  2:06 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: linux-next, linux-kernel, Corentin Chary, Andrew Morton, Seth Forshee

[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]

Hi Matthew,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/toshiba_acpi.c between commit f5f4fd451634
("backlight: initialize struct backlight_properties properly") from
Linus' tree and commit 7d307fbdefbf ("toshiba_acpi: Only register
backlight device when interface is read/write") from the drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/toshiba_acpi.c
index 57787d8,bde32de..0000000
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@@ -1020,6 -1069,54 +1069,55 @@@ static int __devinit toshiba_acpi_setup
  	return error;
  }
  
+ static int __devinit toshiba_acpi_setup_backlight(struct toshiba_acpi_dev *dev)
+ {
+ 	struct backlight_properties props;
+ 	int brightness;
+ 	int ret;
+ 	bool enabled;
+ 
+ 	/*
+ 	 * Some machines don't support the backlight methods at all, and
+ 	 * others support it read-only. Either of these is pretty useless,
+ 	 * so only register the backlight device if the backlight method
+ 	 * supports both reads and writes.
+ 	 */
+ 	brightness = __get_lcd_brightness(dev);
+ 	if (brightness < 0)
+ 		return 0;
+ 	ret = set_lcd_brightness(dev, brightness);
+ 	if (ret) {
+ 		pr_debug("Backlight method is read-only, disabling backlight support\n");
+ 		return 0;
+ 	}
+ 
+ 	/* Determine whether or not BIOS supports transflective backlight */
+ 	ret = get_tr_backlight_status(dev, &enabled);
+ 	dev->tr_backlight_supported = !ret;
+ 
++	memset(&props, 0, sizeof(props));
+ 	props.type = BACKLIGHT_PLATFORM;
+ 	props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
+ 
+ 	/* adding an extra level and having 0 change to transflective mode */
+ 	if (dev->tr_backlight_supported)
+ 		props.max_brightness++;
+ 	dev->backlight_dev = backlight_device_register("toshiba",
+ 						       &dev->acpi_dev->dev,
+ 						       dev,
+ 						       &toshiba_backlight_data,
+ 						       &props);
+ 	if (IS_ERR(dev->backlight_dev)) {
+ 		ret = PTR_ERR(dev->backlight_dev);
+ 		pr_err("Could not register toshiba backlight device\n");
+ 		dev->backlight_dev = NULL;
+ 		return ret;
+ 	}
+ 
+ 	dev->backlight_dev->props.brightness = brightness;
+ 	return 0;
+ }
+ 
  static int toshiba_acpi_remove(struct acpi_device *acpi_dev, int type)
  {
  	struct toshiba_acpi_dev *dev = acpi_driver_data(acpi_dev);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2011-04-08  5:26 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2011-04-08  5:26 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-next, linux-kernel, Lucas De Marchi, Ameya Palande

Hi Matthew,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/intel_mid_thermal.c between commit 25985edcedea
("Fix common misspellings") from Linus' tree and commit 55488261b326
("platform-x86: intel_mid_thermal: Fix coding style") from the
drivers-x86 tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/intel_mid_thermal.c
index c2f4bd8,9ee707f..0000000
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@@ -178,47 -179,47 +179,47 @@@ static int adc_to_temp(int direct, uint
   */
  static int mid_read_temp(struct thermal_zone_device *tzd, unsigned long *temp)
  {
-        struct thermal_device_info *td_info = tzd->devdata;
-        uint16_t adc_val, addr;
-        uint8_t data = 0;
-        int ret;
-        unsigned long curr_temp;
- 
- 
-        addr = td_info->chnl_addr;
- 
-        /* Enable the msic for conversion before reading */
-        ret = intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL3, MSIC_ADCRRDATA_ENBL);
-        if (ret)
-                return ret;
- 
-        /* Re-toggle the RRDATARD bit (temporary workaround) */
-        ret = intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL3, MSIC_ADCTHERM_ENBL);
-        if (ret)
-                return ret;
- 
-        /* Read the higher bits of data */
-        ret = intel_scu_ipc_ioread8(addr, &data);
-        if (ret)
-                return ret;
- 
-        /* Shift bits to accommodate the lower two data bits */
-        adc_val = (data << 2);
-        addr++;
- 
-        ret = intel_scu_ipc_ioread8(addr, &data);/* Read lower bits */
-        if (ret)
-                return ret;
- 
-        /* Adding lower two bits to the higher bits */
-        data &= 03;
-        adc_val += data;
- 
-        /* Convert ADC value to temperature */
-        ret = adc_to_temp(td_info->direct, adc_val, &curr_temp);
-        if (ret == 0)
-                *temp = td_info->curr_temp = curr_temp;
-        return ret;
+ 	struct thermal_device_info *td_info = tzd->devdata;
+ 	uint16_t adc_val, addr;
+ 	uint8_t data = 0;
+ 	int ret;
+ 	unsigned long curr_temp;
+ 
+ 
+ 	addr = td_info->chnl_addr;
+ 
+ 	/* Enable the msic for conversion before reading */
+ 	ret = intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL3, MSIC_ADCRRDATA_ENBL);
+ 	if (ret)
+ 		return ret;
+ 
+ 	/* Re-toggle the RRDATARD bit (temporary workaround) */
+ 	ret = intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL3, MSIC_ADCTHERM_ENBL);
+ 	if (ret)
+ 		return ret;
+ 
+ 	/* Read the higher bits of data */
+ 	ret = intel_scu_ipc_ioread8(addr, &data);
+ 	if (ret)
+ 		return ret;
+ 
 -	/* Shift bits to accomodate the lower two data bits */
++	/* Shift bits to accommodate the lower two data bits */
+ 	adc_val = (data << 2);
+ 	addr++;
+ 
+ 	ret = intel_scu_ipc_ioread8(addr, &data);/* Read lower bits */
+ 	if (ret)
+ 		return ret;
+ 
+ 	/* Adding lower two bits to the higher bits */
+ 	data &= 03;
+ 	adc_val += data;
+ 
+ 	/* Convert ADC value to temperature */
+ 	ret = adc_to_temp(td_info->direct, adc_val, &curr_temp);
+ 	if (ret == 0)
+ 		*temp = td_info->curr_temp = curr_temp;
+ 	return ret;
  }
  
  /**

^ permalink raw reply	[flat|nested] 16+ messages in thread

* linux-next: manual merge of the drivers-x86 tree with Linus' tree
@ 2010-08-25  1:22 Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2010-08-25  1:22 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: linux-next, linux-kernel, Jonathan Corbet, Dmitry Torokhov

Hi Matthew,

Today's linux-next merge of the drivers-x86 tree got a conflict in
drivers/platform/x86/Kconfig between commit
c76a3e1d6c52c5cc1371f1abc7381c5715ebdf7f ("ACPI_TOSHIBA needs LEDS
support") from Lunus' tree and commit
35989e9d7e19deb4b395aee7d120b1536337b4af ("toshiba-acpi - switch to using
sparse keymap") from the drivers-x86 tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/platform/x86/Kconfig
index cff7cc2,8498389..0000000
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@@ -486,12 -490,10 +490,12 @@@ config TOPSTAR_LAPTO
  config ACPI_TOSHIBA
  	tristate "Toshiba Laptop Extras"
  	depends on ACPI
 +	depends on LEDS_CLASS
 +	depends on NEW_LEDS
 +	depends on BACKLIGHT_CLASS_DEVICE
  	depends on INPUT
  	depends on RFKILL || RFKILL = n
- 	select INPUT_POLLDEV
+ 	select INPUT_SPARSEKMAP
 -	select BACKLIGHT_CLASS_DEVICE
  	---help---
  	  This driver adds support for access to certain system settings
  	  on "legacy free" Toshiba laptops.  These laptops can be recognized by

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-03-08  2:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-24  2:48 linux-next: manual merge of the drivers-x86 tree with Linus' tree Stephen Rothwell
2011-03-24  2:52 ` Matthew Garrett
  -- strict thread matches above, loose matches on Subject: below --
2024-03-08  2:34 Stephen Rothwell
2024-03-08  2:19 Stephen Rothwell
2024-03-01  3:14 Stephen Rothwell
2024-02-08  1:57 Stephen Rothwell
2024-01-02  2:30 Stephen Rothwell
2018-10-29  3:29 Stephen Rothwell
2018-10-29  9:34 ` Andy Shevchenko
2016-01-15  1:56 Stephen Rothwell
2015-06-02  6:07 Stephen Rothwell
2015-06-03  3:27 ` Darren Hart
2015-06-03  4:04   ` Stephen Rothwell
2012-05-31  2:06 Stephen Rothwell
2011-04-08  5:26 Stephen Rothwell
2010-08-25  1:22 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).