[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Sébastien Chaumat <euidzero@xxxxxxxxx>
  • From: Mario Limonciello <mario.limonciello@xxxxxxx>
  • Date: Tue, 16 Jan 2024 20:15:42 -0600
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rsTljQCujIoxIj6coHRh8yy3EymOymYrxEmjuvWwg5I=; b=czUcJfiOV9tAQhbRS7MrhoBUlPls8mWvOQ1Zja1RhhbvD9/vV0c66Z/FrMfRmdG8aqKUiVEyetH2gRc6AGeC11JWPgnYOPl5UyTRo5yLvU/8rCNsOK9rUH6udqp3T6LN1L4WQXkfpVlB+BBKwZ5y29obZWlc3L1nfxCD4w+PGmOz+5tjOCM/vXchxKvUOXj6QQzLKAJG4B9YtghRRUdQLPyf4ilVEowwp/i0inQNA8TQHvbofxGr8/GtqWzAnRyNyssa8R3ca5D2yAS3xBHi9C9LXgQab20gfrbXZMTrEgASfgdfDVysQgZN9JKzqEjV9DOo8HnxV/+33RqhJjOZSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JesTN+TRmGKF5Yq9UL2pgs6A5/yec6Q3Ylh1kXaparPx0NucrQFNqSXIGeoDNaMU5pqA64O1GYMdEPdy/F3hHJz9UI8SVZ/nAnMacz/zPHac4RsRTFtAfnLfCpB+kNz481T2IeAp964YL5/5/RqcQq+J81tWGA6VA0keZgg8cXU63ovuWThbgrMuHLy50isDrHOrT3oNIy0nFdNbgEA0wU2B1dH5axTu8Zv1K6d/vfWGunj4ihdo7776IcrdH7EafBpQdKMIRrQ6MMRwm+qR3tiwGvkEbFZj43mi6mgAg8aHyIaVBrWyIqVjf8zJlSW+w8JH53woBhLL5QbRYWNVCA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 17 Jan 2024 11:24:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 1/16/2024 10:18, Jan Beulich wrote:
On 16.01.2024 16:52, Sébastien Chaumat wrote:
Le mar. 2 janv. 2024 à 21:23, Sébastien Chaumat <euidzero@xxxxxxxxx> a
écrit :


  output of gpioinfo

kernel alone :

         line   5: unnamed         input active-low consumer=interrupt
         line  84: unnamed         input active-low consumer=interrupt

xen:

         line   5: unnamed         input active-low
         line  84: unnamed         input active-low

xen with skipping IRQ7 double init :

         line   5: unnamed         input active-low consumer=interrupt
         line  84: unnamed         input active-low


So definitely progressing.


Checking /sys/kernel/irq/7

kernel alone :
  actions: pinctrl_amd
  chip_name: IR-IO-APIC
  hwirq: 7
  name: fasteoi
  per_cpu_count: 0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0
  type: level
  wakeup: enabled

xen skipping IRQ7 double init :

actions: pinctrl_amd
  chip_name: xen-pirq
  hwirq:
  name: ioapic-level
  per_cpu_count: 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
  type: edge
  wakeup: disabled

So the skip of IRQ7 in pci_xen_initial_domain() sets the correct handler
  (IIUC xen uses the ioapic-level and handles the eoi separately), but not
the correct type (still edge).
I guess this may explains the results above.


  Mario (in CC) patched the pinctrl_amd to flush pending interrupt before
starting the driver for the GPIO.

This helped in  the sense of there's no more pending interrupt on IRQ7
(whatever the handler is, level or edge) but then the touchpad is not
detected by i2c-hid.

Is there any work in progress related to the incorrect IRQ configuration ?

I'm not aware of any. As per my recollection it's still not entirely
clear where in the kernel things go astray. And to be honest I don't
feel comfortable trying to half-blindly address this, e.g. by trying
to circumvent / defer the early setting up of the low 16 IRQs.

Jan

Shot in the dark - but could this be a problem where PCAT_COMPAT from the MADT is being ignored causing PIC not to be setup properly in the Xen case?

See https://lore.kernel.org/all/875y2u5s8g.ffs@tglx/ for some context.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.