From: Guenter Roeck <linux@roeck-us.net>
To: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Cc: "Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"De Marchi, Lucas" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
"Poosa, Karthik" <karthik.poosa@intel.com>,
"Abliyev, Reuven" <reuven.abliyev@intel.com>,
"Weil, Oren jer" <oren.jer.weil@intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 01/11] mtd: core: always create master device
Date: Mon, 9 Jun 2025 06:08:10 -0700 [thread overview]
Message-ID: <4d55ac06-c357-4d78-b8b8-5b26486ce529@roeck-us.net> (raw)
In-Reply-To: <CY5PR11MB63660CFA966BCA1B44528BB1ED6BA@CY5PR11MB6366.namprd11.prod.outlook.com>
On 6/9/25 05:23, Usyskin, Alexander wrote:
>> Subject: Re: [PATCH v6 01/11] mtd: core: always create master device
>>
>>
>>>>>> Several of my qemu boot tests fail to boot from mtd devices with this
>> patch
>>>>>> in the mainline kernel. Reverting it fixes the problem. As far as I can
>>>>>> see this affects configurations with
>> CONFIG_MTD_PARTITIONED_MASTER=y
>>>>>> when
>>>>>> trying to boot from an mtd partition other than mtdblock0, with the
>>>>>> mtd partition data in devicetree (.../aspeed/openbmc-flash-layout.dtsi).
>>>>>> Is there a guidance describing the changed behavior, by any chance,
>>>>>> and how the boot command line now needs to look like when using one
>> of
>>>>>> the flash partitions as root file system ?
>>>>>>
>>>>>> Thanks,
>>>>>> Guenter
>>>>>
>>>>> I've tried to make is as transparent as possible for the existing users.
>>>>> Only change is that now every partition has master that is not partitioned.
>>>>> Is the CONFIG_MTD_PARTITIONED_MASTER=n fixed the problem for you?
>>>> No change is expected, can you please describe the devices that you
>>>> observe with and without the patch? Maybe there is something wrong in
>>>> the core logic.
>>>>
>>>
>>> I am trying to boot supermicro-x11spi-bmc in qemu from flash partition 6.
>>> The qemu command line is something like
>>>
>>> qemu-system-arm -M supermicro-x11spi-bmc,fmc-
>> model=n25q256a13,spi-model=n25q256a13 \
>>> -kernel arch/arm/boot/zImage -no-reboot -snapshot \
>>> -audio none \
>>> -drive file=/tmp/flash,format=raw,if=mtd,index=1 \
>>> -nic user \
>>> --append "root=/dev/mtdblock6 rootwait console=ttyS4,115200
>> earlycon=uart8250,mmio32,0x1e784000,115200n8" \
>>> -dtb arch/arm/boot/dts/aspeed/aspeed-bmc-supermicro-x11spi.dtb
>> \
>>> -nographic -monitor null -serial stdio
>>>
>>> This is with aspeed_g5_defconfig. Note that the flash models need to be
>> specified.
>>> The default flashes are no longer recognized when booting from qemu since
>> commit
>>> 947c86e481a0 ("mtd: spi-nor: macronix: Drop the redundant flash info
>> fields").
>>>
>>> The above only works with this patch reverted (or with v6.15 and older, of
>> course).
>>>
>>> Guenter
>>
>> Alexander, can you please investigate? We need a fix because Guenter
>> might not be the only affecter user. Otherwise this patch can't stand,
>> unfortunately.
>>
>> Thanks,
>> Miquèl
>
> Maybe something is moved, and it is not /dev/mtdblock6 now.
>
With this patch:
# ls -l /dev/*mtd*
crw------- 1 root root 90, 0 Jan 1 00:00 /dev/mtd0
crw------- 1 root root 90, 1 Jan 1 00:00 /dev/mtd0ro
crw------- 1 root root 90, 2 Jan 1 00:00 /dev/mtd1
crw------- 1 root root 90, 3 Jan 1 00:00 /dev/mtd1ro
crw------- 1 root root 244, 0 Jan 1 00:00 /dev/mtd_master0
crw------- 1 root root 244, 1 Jan 1 00:00 /dev/mtd_master1
brw------- 1 root root 31, 0 Jan 1 00:00 /dev/mtdblock0
brw------- 1 root root 31, 1 Jan 1 00:00 /dev/mtdblock1
~ # ls /proc/mtd
/proc/mtd
~ # cat /proc/mtd
dev: size erasesize name
mtd0: 02000000 00010000 "bmc"
mtd1: 02000000 00010000 "pnor"
After reverting it:
# ls -l /dev/mtd*
crw------- 1 root root 90, 0 Jan 1 00:00 /dev/mtd0
crw------- 1 root root 90, 1 Jan 1 00:00 /dev/mtd0ro
crw------- 1 root root 90, 2 Jan 1 00:00 /dev/mtd1
crw------- 1 root root 90, 3 Jan 1 00:00 /dev/mtd1ro
crw------- 1 root root 90, 4 Jan 1 00:00 /dev/mtd2
crw------- 1 root root 90, 5 Jan 1 00:00 /dev/mtd2ro
crw------- 1 root root 90, 6 Jan 1 00:00 /dev/mtd3
crw------- 1 root root 90, 7 Jan 1 00:00 /dev/mtd3ro
crw------- 1 root root 90, 8 Jan 1 00:00 /dev/mtd4
crw------- 1 root root 90, 9 Jan 1 00:00 /dev/mtd4ro
crw------- 1 root root 90, 10 Jan 1 00:00 /dev/mtd5
crw------- 1 root root 90, 11 Jan 1 00:00 /dev/mtd5ro
crw------- 1 root root 90, 12 Jan 1 00:00 /dev/mtd6
crw------- 1 root root 90, 13 Jan 1 00:00 /dev/mtd6ro
brw------- 1 root root 31, 0 Jan 1 00:00 /dev/mtdblock0
brw------- 1 root root 31, 1 Jan 1 00:00 /dev/mtdblock1
brw------- 1 root root 31, 2 Jan 1 00:00 /dev/mtdblock2
brw------- 1 root root 31, 3 Jan 1 00:00 /dev/mtdblock3
brw------- 1 root root 31, 4 Jan 1 00:00 /dev/mtdblock4
brw------- 1 root root 31, 5 Jan 1 00:00 /dev/mtdblock5
brw------- 1 root root 31, 6 Jan 1 00:00 /dev/mtdblock6
~ # cat /proc/mtd
dev: size erasesize name
mtd0: 02000000 00010000 "bmc"
mtd1: 00060000 00010000 "u-boot"
mtd2: 00020000 00010000 "u-boot-env"
mtd3: 00440000 00010000 "kernel"
mtd4: 01740000 00010000 "rofs"
mtd5: 00400000 00010000 "rwfs"
mtd6: 02000000 00010000 "pnor"
I am trying to boot from "pnor". It looks like the partition data (from devicetree)
is now ignored. mtdblock6 used to be the second flash.
Guenter
next prev parent reply other threads:[~2025-06-09 13:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-02 14:09 [PATCH v6 00/11] mtd: add driver for Intel discrete graphics Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 01/11] mtd: core: always create master device Alexander Usyskin
2025-06-08 1:37 ` Guenter Roeck
2025-06-08 7:00 ` Usyskin, Alexander
2025-06-08 19:37 ` Miquel Raynal
2025-06-09 0:59 ` Guenter Roeck
2025-06-09 9:43 ` Miquel Raynal
2025-06-09 12:23 ` Usyskin, Alexander
2025-06-09 13:08 ` Guenter Roeck [this message]
2025-06-09 15:16 ` Usyskin, Alexander
2025-06-09 15:53 ` Guenter Roeck
2025-06-09 21:27 ` Richard Weinberger
2025-06-10 11:02 ` Usyskin, Alexander
2025-06-10 12:54 ` Richard Weinberger
2025-06-10 16:15 ` Guenter Roeck
2025-06-11 9:34 ` Miquel Raynal
2025-06-11 10:26 ` Richard Weinberger
2025-06-11 10:52 ` Usyskin, Alexander
2025-06-11 14:53 ` Miquel Raynal
2025-06-12 10:01 ` Usyskin, Alexander
2025-06-12 10:25 ` Richard Weinberger
2025-06-12 12:37 ` Usyskin, Alexander
2025-03-02 14:09 ` [PATCH v6 02/11] mtd: add driver for intel graphics non-volatile memory device Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 03/11] mtd: intel-dg: implement region enumeration Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 04/11] mtd: intel-dg: implement access functions Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 05/11] mtd: intel-dg: register with mtd Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 06/11] mtd: intel-dg: align 64bit read and write Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 07/11] mtd: intel-dg: wake card on operations Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 08/11] drm/i915/nvm: add nvm device for discrete graphics Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 09/11] drm/i915/nvm: add support for access mode Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 10/11] drm/xe/nvm: add on-die non-volatile memory device Alexander Usyskin
2025-03-02 14:09 ` [PATCH v6 11/11] drm/xe/nvm: add support for access mode Alexander Usyskin
2025-03-18 16:02 ` [PATCH v6 00/11] mtd: add driver for Intel discrete graphics Miquel Raynal
2025-03-26 15:22 ` Usyskin, Alexander
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=4d55ac06-c357-4d78-b8b8-5b26486ce529@roeck-us.net \
--to=linux@roeck-us.net \
--cc=airlied@gmail.com \
--cc=alexander.usyskin@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=karthik.poosa@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=mripard@kernel.org \
--cc=oren.jer.weil@intel.com \
--cc=reuven.abliyev@intel.com \
--cc=richard@nod.at \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®