Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472498

Re: Kernel Freeze with American Megatrends BIOS

From Emil Velikov <emil.l.velikov@gmail.com>
Newsgroups linux.kernel
Subject Re: Kernel Freeze with American Megatrends BIOS
Date 2016-08-30 16:10 +0200
Message-ID <sbRTH-5Ua-9@gated-at.bofh.it> (permalink)
References (3 earlier) <sbA6u-2Nk-53@gated-at.bofh.it> <sbASR-37n-1@gated-at.bofh.it> <sbED7-5tL-19@gated-at.bofh.it> <sbOj8-3sC-19@gated-at.bofh.it> <sbQXD-5kV-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 30 August 2016 at 14:06, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Tue, Aug 30, 2016 at 12:08:57PM +0200, Roland Singer wrote:
>> Thanks for pointing it out.
>>
>> Yeah that's right. The system will hang randomly a few minutes later,
>> because some certain actions in the graphical user session will trigger
>> the freeze.
>>
>> I had a look at the function body of pci_read_config_dword:
>>
>>   #define PCI_OP_READ(size, type, len) \
>>   int pci_bus_read_config_##size \
>>       (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
>>   {                                                                   \
>>       int res;                                                        \
>>       unsigned long flags;                                            \
>>       u32 data = 0;                                                   \
>>       if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;       \
>>       raw_spin_lock_irqsave(&pci_lock, flags);                        \
>>       res = bus->ops->read(bus, devfn, pos, len, &data);              \
>>       *value = (type)data;                                            \
>>       raw_spin_unlock_irqrestore(&pci_lock, flags);           \
>>       return res;                                                     \
>>   }
>>
>> I guess, that bus->ops->read(...) might be the trigger.
>> Any hints how to continue debugging?
>
> It's not likely that the problem is in the bus->ops->read() path.  That
> is used by every device driver, so a problem there would cause more
> serious problems than what you're seeing.
>
> My guess would be some problem in the video driver or the bbswitch
> thing.
>
FWIW I'm inclined to call it a bbswitch bug. It can (and does when
needed) power off the dedicated GPU.

Depending on the platform different methods are used:

Sometimes the GPU driver will get 0xffffffff (or similar) when trying
to read from the device mmio space. While one can say that the driver
should attribute for this, IMHO it's a bad idea to have two drivers
controlling the same hardware, let alone without any coordination
between them.

IIRC in some cases the device can disappear from the PCI bus (not 100%
sure this one). In which case a simple read can lead to a wide range
of fireworks.

Disclaimer: it's been a while since I've looked into bbswitch so
things might have changed/improved.

Regards,
Emil

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Kernel Freeze with American Megatrends BIOS Bjorn Helgaas <helgaas@kernel.org> - 2016-08-29 18:10 +0200
  Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-29 21:10 +0200
    Re: Kernel Freeze with American Megatrends BIOS Bjorn Helgaas <helgaas@kernel.org> - 2016-08-29 21:10 +0200
      Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-29 22:00 +0200
        Re: Kernel Freeze with American Megatrends BIOS Bjorn Helgaas <helgaas@kernel.org> - 2016-08-30 02:00 +0200
          Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-30 12:20 +0200
            Re: Kernel Freeze with American Megatrends BIOS Bjorn Helgaas <helgaas@kernel.org> - 2016-08-30 15:10 +0200
              Re: Kernel Freeze with American Megatrends BIOS Emil Velikov <emil.l.velikov@gmail.com> - 2016-08-30 16:10 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-30 17:30 +0200
                Re: Kernel Freeze with American Megatrends BIOS Ilia Mirkin <imirkin@alum.mit.edu> - 2016-08-30 17:50 +0200
                Re: Kernel Freeze with American Megatrends BIOS Ilia Mirkin <imirkin@alum.mit.edu> - 2016-08-30 17:50 +0200
                Re: Kernel Freeze with American Megatrends BIOS Emil Velikov <emil.l.velikov@gmail.com> - 2016-08-30 17:50 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-30 19:40 +0200
                Re: Kernel Freeze with American Megatrends BIOS Ilia Mirkin <imirkin@alum.mit.edu> - 2016-08-30 19:50 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-30 20:10 +0200
                Re: Kernel Freeze with American Megatrends BIOS Ilia Mirkin <imirkin@alum.mit.edu> - 2016-08-30 20:20 +0200
                Re: Kernel Freeze with American Megatrends BIOS Peter Wu <peter@lekensteyn.nl> - 2016-08-30 21:30 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 13:20 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 13:20 +0200
                Re: Kernel Freeze with American Megatrends BIOS Emil Velikov <emil.l.velikov@gmail.com> - 2016-08-30 20:10 +0200
                Re: Kernel Freeze with American Megatrends BIOS Emil Velikov <emil.l.velikov@gmail.com> - 2016-08-30 20:20 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 13:00 +0200
  Re: Kernel Freeze with American Megatrends BIOS Peter Wu <peter@lekensteyn.nl> - 2016-08-30 22:00 +0200
    Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 13:30 +0200
      Re: Kernel Freeze with American Megatrends BIOS Peter Wu <peter@lekensteyn.nl> - 2016-08-31 13:50 +0200
        Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 14:30 +0200
          Re: Kernel Freeze with American Megatrends BIOS Peter Wu <peter@lekensteyn.nl> - 2016-08-31 14:40 +0200
            Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 15:20 +0200
              Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 22:10 +0200
                Re: Kernel Freeze with American Megatrends BIOS Roland Singer <roland.singer@desertbit.com> - 2016-08-31 22:20 +0200

csiph-web