RE: [PATCH v2] io-mapping: Indicate mapping failure

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

 



>-----Original Message-----
>From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>Sent: Tuesday, July 21, 2020 5:24 PM
>To: Ruhl, Michael J <michael.j.ruhl@xxxxxxxxx>
>Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; Mike Rapoport <rppt@xxxxxxxxxxxxx>;
>Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>; Chris Wilson
><chris@xxxxxxxxxxxxxxxxxx>; stable@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH v2] io-mapping: Indicate mapping failure
>
>On Tue, 21 Jul 2020 21:02:44 +0000 "Ruhl, Michael J"
><michael.j.ruhl@xxxxxxxxx> wrote:
>
>> >--- a/include/linux/io-mapping.h~io-mapping-indicate-mapping-failure-fix
>> >+++ a/include/linux/io-mapping.h
>> >@@ -107,9 +107,12 @@ io_mapping_init_wc(struct io_mapping *io
>> > 		   resource_size_t base,
>> > 		   unsigned long size)
>> > {
>> >+	iomap->iomem = ioremap_wc(base, size);
>> >+	if (!iomap->iomem)
>> >+		return NULL;
>> >+
>>
>> This does make more sense.
>>
>> I am confused by the two follow up emails I just got.
>
>One was your original patch, the other is my suggested alteration.
>
>> Shall I resubmit, or is this path (if !iomap->iomem) return NULL)
>> now in the tree.
>
>All is OK.  If my alteration is acceptable (and, preferably, tested!)
>then when the time comes, I'll fold it into the base patch, add a
>note indicating this change and shall then send it to Linus.

I am good with the change and have tested it.

Instead of the system crashing I get:

i915 0000:01:00.0: [drm] *ERROR* Failed to setup region(-5) type=1
i915 0000:01:00.0: Device initialization failed (-5)
i915: probe of 0000:01:00.0 failed with error -5

Which is the expected error.

If you would like this for the updated patch:

Tested-By: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>

Thanks!

Mike

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux