From patchwork Mon Apr 28 08:09:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 4075661 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 39D11BFF02 for ; Mon, 28 Apr 2014 08:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35F27202AE for ; Mon, 28 Apr 2014 08:09:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 520F820295 for ; Mon, 28 Apr 2014 08:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753423AbaD1IJ2 (ORCPT ); Mon, 28 Apr 2014 04:09:28 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:62443 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752941AbaD1IJY (ORCPT ); Mon, 28 Apr 2014 04:09:24 -0400 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wegct-00075D-P3 from Thomas_Schwinge@mentor.com ; Mon, 28 Apr 2014 01:09:23 -0700 Received: from SVR-IES-FEM-02.mgc.mentorg.com ([137.202.0.106]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 28 Apr 2014 01:09:23 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.2.247.3; Mon, 28 Apr 2014 09:09:21 +0100 From: Thomas Schwinge To: Jerome Glisse CC: Bjorn Helgaas , , "Johannes Weiner" , Mel Gorman , Rik van Riel , Andrea Arcangeli , Zlatko Calusic , Minchan Kim , , , Andrew Morton , Alex Deucher , Christian =?utf-8?Q?K=C3=B6nig?= , Subject: Re: radeon: screen garbled after page allocator change, was: Re: [patch v2 3/3] mm: page_alloc: fair zone allocator policy In-Reply-To: <20140427195527.GC9315@gmail.com> References: <1375457846-21521-1-git-send-email-hannes@cmpxchg.org> <1375457846-21521-4-git-send-email-hannes@cmpxchg.org> <87r45fajun.fsf@schwinge.name> <20140424133722.GD4107@cmpxchg.org> <20140427033110.GA15091@gmail.com> <20140427195527.GC9315@gmail.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Mon, 28 Apr 2014 10:09:17 +0200 Message-ID: <87ppk1q3iq.fsf@schwinge.name> MIME-Version: 1.0 X-OriginalArrivalTime: 28 Apr 2014 08:09:23.0524 (UTC) FILETIME=[2A4DB040:01CF62B9] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi! On Sun, 27 Apr 2014 15:55:29 -0400, Jerome Glisse wrote: > If my ugly patch works does this quirk also work ? Unfortunately they both don't; see my other email, . Also, the quirk patch resulted in a NULL pointer dereference in pci_find_ht_capability+0x4/0x30, which I hacked around as follows: If needed, I can try to capture more data, but someone who has knowledge of PCI bus architecture and Linux kernel code (so, not me), might probably already see what's wrong. Grüße, Thomas diff --git drivers/pci/quirks.c drivers/pci/quirks.c index f025867..33aaad2 100644 --- drivers/pci/quirks.c +++ drivers/pci/quirks.c @@ -2452,6 +2452,8 @@ u64 pci_ht_quirk_dma_32bit_only(struct pci_dev *dev, u64 mask) struct pci_dev *bridge = bus->self; int pos; + if (!bridge) + goto skip; pos = pci_find_ht_capability(bridge, HT_CAPTYPE_SLAVE); if (pos) { int ctrl_off; @@ -2472,6 +2474,7 @@ u64 pci_ht_quirk_dma_32bit_only(struct pci_dev *dev, u64 mask) return 0xffffffff; } } + skip: bus = bus->parent; } while (bus); return mask;