linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>
Subject: Re: [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression
Date: Fri, 6 Feb 2009 08:49:44 -0800	[thread overview]
Message-ID: <200902060849.45851.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0902061248010.14011@blonde.anvils>

On Friday, February 6, 2009 4:56 am Hugh Dickins wrote:
> On Fri, 6 Feb 2009, Benjamin Herrenschmidt wrote:
> > On Thu, 2009-02-05 at 14:33 -0800, Jesse Barnes wrote:
> > > One option there would be to provide the file but just use anonymous
> > > memory to back it.  X will happily think it's messing with legacy VGA
> > > memory, but it shouldn't matter that it's not actually affecting hw.
> >
> > What about this (untested) patch ?
> >
> > powerpc/pci: mmap anonymous memory when legacy_mem doesn't exist
> >
> > The new legacy_mem file in sysfs is causing problems with X on machines
> > that don't support legacy memory access. The way I initially implemented
> > it, we would fail with -ENXIO when trying to mmap it, thus exposing to
> > X that we do support the API but there is no legacy memory.
> >
> > Unfortunately, X poor error handling is causing it to fail to start when
> > it gets this error.
> >
> > This implements a workaround hack that instead maps anonymous memory
> > instead (using shmem if VM_SHARED is set, just like /dev/zero does).
> >
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
>
> Beautiful idea, works very nicely for me.
> Put a dummy in the baby's mouth to stop it crying.
>
> I still don't understand the point of this legacy_mem file at all,
> and why X should want to mmap it, if it works so well when it's
> thus divorced from reality.  But I won't worry my pretty little
> head over it any further - please don't waste your time trying
> to explain it to me!

Hugh, did you get a chance to try my X patch (w/o Ben's patch applied)?  If it 
also works, we should apply it to X too, if only to make porting to future 
platforms a little easier.

Since you probably don't want to know, you can skip this paragraph as it 
describes the motivation behind the legacy_mem file. :)  The motivation for 
it was to support machines with multihead video card configurations, but 
which could also support multiple legacy port I/O and memory spaces (e.g. on 
a per PCI domain basis).  It allows X to run option ROMs on multiple devices 
simultaneously, and can also help with hardware that can't route legacy space 
from a given host bus to arbitrary system addresses.  When we put this in 
initially, Ben knew there were some platforms where legacy memory simply 
wasn't available, but we figured that shouldn't be a problem, since X didn't 
really *need* that space to function (most ROMs just put splash screens 
there).  Unfortunately in the interim, X made the lack of an mmap'able 
legacy_mem file into a fatal error.

In the past, doing Linux bringup on a platform with a complex I/O topology 
(sparc, ia64, alpha, etc.) usually meant doing X bring up as well, often by 
adding new interfaces or hacks to X.  With the legacy_mem and io files, 
there's a chance that X won't have to be modified at bring up time, so in 
that sense the APIs are a step forward.  However that also means your 
platform has to support the APIs in a way consistent with how X uses them, as 
you discovered. :)

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2009-02-06 17:02 UTC|newest]

Thread overview: 158+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 10:21 2.6.29-rc3-git6: Reported regressions from 2.6.28 Rafael J. Wysocki
2009-02-04 10:21 ` [Bug #12400] git-latest: kernel oops in IOMMU setup Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12414] iwl4965 cannot use "ap auto" on latest 2.6.28/29? Rafael J. Wysocki
2009-02-04 19:15   ` Jeff Chua
2009-02-05  1:37     ` Rafael J. Wysocki
2009-02-05 14:34       ` Jeff Chua
2009-02-14 11:41   ` Jeff Chua
2009-02-14 18:46     ` Jeff Chua
2009-02-14 20:10       ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12416] Recent change to kernel spikes out ccache/distcc Rafael J. Wysocki
2009-02-05  1:57   ` Theodore Tso
2009-02-05  2:13     ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12415] WARNING: at drivers/net/wireless/iwlwifi/iwl-sta.c:689 Rafael J. Wysocki
2009-02-04 13:04   ` Christian Borntraeger
2009-02-05  1:39     ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12427] cpumask change causes sparc build bustage Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12419] possible circular locking dependency on i915 dma Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12417] glx performance drop with: "x86: PAT: implement track/untrack of pfnmap regions for x86 - v3" Rafael J. Wysocki
2009-02-04 13:46   ` Ingo Molnar
2009-02-04 16:02     ` Alexey Fisher
2009-02-04 16:42       ` Ingo Molnar
2009-02-05  0:55         ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12418] Repeated ioctl(4, 0x40046445, ..) loop in glxgears Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12441] Xorg can't use dri on radeon X1950 AGP Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12491] i915 lockdep warning Rafael J. Wysocki
2009-02-04 22:37   ` Roland Dreier
2009-02-05  1:03     ` Rafael J. Wysocki
2009-02-06 22:46       ` Roland Dreier
2009-02-06 23:40         ` Jesse Barnes
2009-02-07  1:20         ` Brandeburg, Jesse
2009-02-07  1:48           ` Roland Dreier
2009-02-07 13:53             ` Rafael J. Wysocki
2009-02-11  0:43             ` Eric Anholt
2009-02-11 18:14               ` Roland Dreier
2009-02-04 10:23 ` [Bug #12490] ath5k related kernel panic in 2.6.29-rc1 Rafael J. Wysocki
2009-02-06 18:48   ` Bob Copeland
2009-02-06 23:55     ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12444] X hangs following switch from radeonfb console - Bisected Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12495] thinkpad problems during resume Rafael J. Wysocki
2009-02-04 13:06   ` Christian Borntraeger
2009-02-05  1:41     ` Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12494] Sony backlight regression from 2.6.28 to 29-rc Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12496] swsusp cannot find resume device (sometimes) Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12493] ACPI related kernel panic when booting 2.6.29-rc2 Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12497] new barrier warnings in 2.6.29-rc1 Rafael J. Wysocki
2009-02-06  8:12   ` Christoph Hellwig
2009-02-04 10:23 ` [Bug #12499] Problem with using bluetooth adaper connected to usb port Rafael J. Wysocki
2009-02-04 10:23 ` [Bug #12501] build bug in eeepc-laptop.c Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12505] 2.6.29-rc1 Firefox crashing on page load Rafael J. Wysocki
2009-02-04 15:23   ` Justin Mattock
2009-02-04 16:46     ` Ingo Molnar
2009-02-04 18:15       ` Justin Mattock
2009-02-05  1:08         ` Rafael J. Wysocki
2009-02-05  1:37           ` Justin Mattock
2009-02-04 10:24 ` [Bug #12502] pipe_read oops on sh Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12503] [slab corruption] BUG key_jar: Poison overwritten Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12508] "powerpc/pci: Reserve legacy regions on PCI" broke my G3 Rafael J. Wysocki
2009-02-04 21:44   ` Benjamin Herrenschmidt
2009-02-06 18:55     ` Mikael Pettersson
2009-02-04 10:24 ` [Bug #12510] 2.6.29-rc2 dies on startup Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12506] Undefined symbols when CONFIG_MFD_PCF50633 is enabled Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12509] lockdep report. fb_mmap vs sys_mmap2 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12551] end_request: I/O error, dev cciss/c0d0, sector 87435720 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12511] WARNING: at drivers/dma/dmaengine.c:352 Rafael J. Wysocki
2009-02-04 16:03   ` Dan Williams
2009-02-05  1:13     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12538] xfs_fsr fails on 2.6.29-rc kernels Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12518] BUG: using smp_processor_id() in preemptible [00000000] code: dellWirelessCtl/ Rafael J. Wysocki
2009-02-04 15:58   ` Alex Riesen
2009-02-04 10:24 ` [Bug #12591] NULL pointer dereference in blk_queue_io_stat Rafael J. Wysocki
2009-02-04 12:53   ` Jens Axboe
2009-02-05  1:21     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12571] Suspend-resume on Dell Latitude D410 newly broken in 2.6.29-rc* Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12574] possible circular locking dependency detected Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12598] tg3 dead after resume Rafael J. Wysocki
2009-02-05  0:43   ` Parag Warudkar
2009-02-05  1:03     ` Jesse Barnes
2009-02-04 10:24 ` [Bug #12600] i915 lockdep warning Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12601] virt-manager broken on 2.6.29-rc2 Rafael J. Wysocki
2009-02-04 23:26   ` Stephen Hemminger
2009-02-05  1:25     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12602] CRED changes causing setuid failures Rafael J. Wysocki
2009-02-04 18:09   ` David Smith
2009-02-05  1:15     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12599] dri /dev node disappeared with 2.6.29-rc1 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12605] Suspend regression, hang after matroxfb Rafael J. Wysocki
2009-02-05 12:16   ` Eric Sesterhenn
2009-02-05 16:12     ` Rafael J. Wysocki
2009-02-08 12:39       ` Eric Sesterhenn
2009-02-04 10:24 ` [Bug #12604] Commit 31a12666d8f0c22235297e1c1575f82061480029 slows down Berkeley DB Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12606] fb_mmap: circular locking dependency on hibernation Rafael J. Wysocki
2009-02-04 14:43   ` Andrey Borzenkov
2009-02-05  1:43     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12609] v2.6.29-rc2 libata sff 32bit PIO regression Rafael J. Wysocki
2009-02-05 17:30   ` Hugh Dickins
2009-02-05 22:54     ` Rafael J. Wysocki
2009-02-06 23:10       ` Larry Finger
2009-02-06 23:58         ` Rafael J. Wysocki
2009-02-23 16:22           ` Larry Finger
2009-02-23 22:13             ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12611] kernel BUG at kernel/cgroup.c:398! Rafael J. Wysocki
2009-02-05  1:02   ` Li Zefan
2009-02-05  1:53     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12610] sync-Regression in 2.6.28.2? Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression Rafael J. Wysocki
2009-02-04 23:48   ` Benjamin Herrenschmidt
2009-02-05 17:23     ` Hugh Dickins
2009-02-05 21:05       ` Benjamin Herrenschmidt
2009-02-05 21:20         ` Hugh Dickins
2009-02-05 21:45         ` Dave Airlie
2009-02-06  6:01           ` Benjamin Herrenschmidt
2009-02-05 22:33         ` Jesse Barnes
2009-02-05 23:57           ` Benjamin Herrenschmidt
2009-02-06  5:40           ` Benjamin Herrenschmidt
2009-02-06 12:56             ` Hugh Dickins
2009-02-06 16:49               ` Jesse Barnes [this message]
2009-02-06 22:17                 ` Hugh Dickins
2009-02-06 22:45                   ` Jesse Barnes
2009-02-07  0:50                     ` Hugh Dickins
2009-02-07  1:47                       ` Jesse Barnes
2009-02-07  3:05                     ` Benjamin Herrenschmidt
2009-02-07 23:15                       ` Jesse Barnes
2009-02-07  2:51               ` Benjamin Herrenschmidt
2009-02-04 10:24 ` [Bug #12617] unable to compile e100 firmware into kernel Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12615] boot hangs while bringing up gianfar ethernet Rafael J. Wysocki
2009-02-04 16:54   ` Ira Snyder
2009-02-05  1:23     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12616] boot hang: async vs. kexec Rafael J. Wysocki
2009-02-04 16:50   ` Randy Dunlap
2009-02-05  1:26     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12613] [Suspend regression][DRM, RADEON] Rafael J. Wysocki
2009-02-04 22:25   ` etienne
2009-02-05  1:18     ` Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12618] hackbench [pthread mode] regression with 2.6.29-rc3 Rafael J. Wysocki
2009-02-04 10:24 ` [Bug #12621] Resume broken on iBook Rafael J. Wysocki
2009-02-04 16:24 ` 2.6.29-rc3-git6: Reported regressions from 2.6.28 Linus Torvalds
2009-02-04 16:32   ` Ingo Molnar
2009-02-04 18:11   ` Norbert Preining
2009-02-04 18:17     ` Linus Torvalds
2009-02-04 18:21       ` Norbert Preining
2009-02-04 18:56       ` Ingo Molnar
2009-02-04 22:22         ` Bron Gondwana
2009-02-05  1:08           ` Ingo Molnar
2009-02-05  1:26             ` Bron Gondwana
2009-02-05  4:45         ` Eric Anholt
2009-02-05 14:51           ` Norbert Preining
2009-02-05 16:56           ` [PATCH] drm, i915: select framebuffer support automatically Ingo Molnar
2009-02-08 11:49             ` Dave Airlie
2009-02-05 17:17           ` 2.6.29-rc3-git6: Reported regressions from 2.6.28 Randy Dunlap
2009-02-05 19:12             ` Ingo Molnar
2009-02-05 19:14               ` Randy Dunlap
2009-02-05 19:20                 ` Ingo Molnar
2009-02-05 19:23                   ` Randy Dunlap
2009-02-05 19:36                     ` Ingo Molnar
2009-02-11  0:33                       ` Eric Anholt
2009-02-05  2:07   ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2009-02-08 19:05 2.6.29-rc4: " Rafael J. Wysocki
2009-02-08 19:21 ` [Bug #12608] 2.6.29-rc powerpc G5 Xorg legacy_mem regression Rafael J. Wysocki
2009-02-09 10:24   ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902060849.45851.jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=benh@kernel.crashing.org \
    --cc=hugh@veritas.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).