linux/drivers
Alexander Sverdlin a7d550f82b of: fdt: Honor CONFIG_CMDLINE* even without /chosen node
I do not read a strict requirement on /chosen node in either ePAPR or in
Documentation/devicetree. Help text for CONFIG_CMDLINE and
CONFIG_CMDLINE_EXTEND doesn't make their behavior explicitly dependent on
the presence of /chosen or the presense of /chosen/bootargs.

However the early check for /chosen and bailing out in
early_init_dt_scan_chosen() skips CONFIG_CMDLINE handling which is not
really related to /chosen node or the particular method of passing cmdline
from bootloader.

This leads to counterintuitive combinations (assuming
CONFIG_CMDLINE_EXTEND=y):

a) bootargs="foo", CONFIG_CMDLINE="bar" => cmdline=="foo bar"
b) /chosen missing, CONFIG_CMDLINE="bar" => cmdline==""
c) bootargs="", CONFIG_CMDLINE="bar" => cmdline==" bar"

Move CONFIG_CMDLINE handling outside of early_init_dt_scan_chosen() so that
cases b and c above result in the same cmdline.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/11af73e05bad75e4ef49067515e3214f6d944b3d.camel@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
2022-12-16 11:22:58 -06:00
..
accel accel: add dedicated minor for accelerator devices 2022-11-22 13:14:44 +02:00
accessibility speakup: Fix building as extmod 2022-11-23 19:55:03 +01:00
acpi More ACPI updates for 6.2-rc1 2022-12-15 10:21:10 -08:00
amba ARM updates for 6.2 2022-12-13 15:22:14 -08:00
android
ata ata changes for 6.2 2022-12-13 10:54:19 -08:00
atm
auxdisplay
base Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
bcma
block Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
bluetooth Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
bus Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
cdrom
char Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
clk A pile of clk driver updates with a small tracepoint patch to the clk core this 2022-12-13 13:46:07 -08:00
clocksource Updates for timers, timekeeping and drivers: 2022-12-12 12:52:02 -08:00
comedi
connector
counter counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-11-26 16:49:28 -05:00
cpufreq linux-kselftest-next-6.2-rc1 2022-12-12 16:39:38 -08:00
cpuidle
crypto This update includes the following changes: 2022-12-14 12:31:09 -08:00
cxl cxl/region: Fix memdev reuse check 2022-12-08 13:03:47 -08:00
dax device-dax: Fix duplicate 'hmem' device registration 2022-11-21 15:34:40 -08:00
dca
devfreq PM / devfreq: event: use devm_platform_get_and_ioremap_resource() 2022-12-05 21:57:20 +09:00
dio
dma iommufd for 6.2 2022-12-14 09:15:43 -08:00
dma-buf Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
edac Merge branches 'edac-ghes' and 'edac-misc' into edac-updates-for-v6.2 2022-12-12 15:40:03 +01:00
eisa
extcon Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
firewire
firmware Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
fpga Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
fsi use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
gnss driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
gpio gpio: updates for v6.2 2022-12-15 09:45:51 -08:00
gpu Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
greybus
hid Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
hsi
hte
hv Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
hwmon hwmon updates for v6.2 merge window 2022-12-13 13:09:38 -08:00
hwspinlock
hwtracing coresight: etm4x: fix repeated words in comments 2022-11-28 18:29:53 +00:00
i2c Core got a new helper 'i2c_client_get_device_id', designware got some 2022-12-15 14:47:10 -08:00
i3c i3c: export SETDASA method 2022-12-11 21:25:58 +01:00
idle
iio Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
infiniband Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
input Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
interconnect Merge branch 'icc-sc8280xp-l3' into icc-next 2022-11-17 17:44:14 +02:00
iommu iommufd for 6.2 2022-12-14 09:15:43 -08:00
ipack
irqchip RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
isdn Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
leds gpio: updates for v6.2 2022-12-15 09:45:51 -08:00
macintosh
mailbox ACPI updates for 6.2-rc1 2022-12-12 13:38:17 -08:00
mcb mcb: mcb-parse: fix error handing in chameleon_parse_gdd() 2022-12-02 17:48:04 +01:00
md - Fix use-after-free races due to missing resource cleanup during DM 2022-12-13 10:58:09 -08:00
media Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
memory ARM updates for 6.2 2022-12-13 15:22:14 -08:00
memstick memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-12-09 10:29:58 +01:00
message
mfd Merge 6.1-rc6 into driver-core-next 2022-11-21 10:21:53 +01:00
misc Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
mmc MMC core: 2022-12-13 13:41:26 -08:00
most
mtd MTD core changes: 2022-12-13 12:32:07 -08:00
mux
net Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
ntb
nubus
nvdimm nvdimm/region: Move cache management to the region driver 2022-12-02 23:52:32 -08:00
nvme Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
nvmem Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
of of: fdt: Honor CONFIG_CMDLINE* even without /chosen node 2022-12-16 11:22:58 -06:00
opp
parisc
parport
pci pci-v6.2-changes 2022-12-14 09:54:10 -08:00
pcmcia driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
peci
perf RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
phy media updates for v6.2-rc1 2022-12-13 11:36:58 -08:00
pinctrl Pin control changes for the v6.2 kernel cycle: 2022-12-13 13:03:06 -08:00
platform USB/Thunderbolt driver changes for 6.2-rc1 2022-12-16 03:22:53 -08:00
pnp PNP: Do not disable devices on suspend when they cannot be re-enabled on resume 2022-11-25 19:36:52 +01:00
power Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
powercap powercap: idle_inject: Fix warnings with make W=1 2022-12-02 20:49:49 +01:00
pps
ps3
ptp Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
pwm pwm: lpss: Rename pwm_lpss_probe() --> devm_pwm_lpss_probe() 2022-11-22 16:36:27 +02:00
rapidio rapidio: devices: fix missing put_device in mport_cdev_open 2022-12-11 19:30:20 -08:00
ras
regulator regulator: Updates for v6.2 2022-12-13 12:49:59 -08:00
remoteproc
reset
rpmsg
rtc
s390 Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
sbus sparc: sbus: treat CPU index as integer 2022-11-19 00:56:15 +01:00
scsi Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: reinit the reconf completion flag 2022-11-23 19:45:33 +01:00
soc Core got a new helper 'i2c_client_get_device_id', designware got some 2022-12-15 14:47:10 -08:00
soundwire ASoC: adau1372: fixes after debugging custom board 2022-11-25 21:26:21 +00:00
spi spi: Updates for v6.2 2022-12-13 12:54:31 -08:00
spmi
ssb
staging Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
target SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
tc
tee SoC driver updates for 6.2 2022-12-12 10:17:08 -08:00
thermal More thermal control updates for 6.2-rc1 2022-12-15 10:16:04 -08:00
thunderbolt
tty Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
ufs SCSI misc on 20221213 2022-12-14 08:58:51 -08:00
uio
usb Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
vdpa driver core: make struct class.devnode() take a const * 2022-11-24 17:12:27 +01:00
vfio Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
vhost use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
video fbdev: fbcon: release buffer when fbcon_do_set_font() failed 2022-12-14 20:01:51 +01:00
virt Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
virtio
vlynq
w1
watchdog ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
xen drm for 6.2: 2022-12-13 11:59:58 -08:00
zorro
Kconfig drivers/accel: define kconfig and register a new major 2022-11-22 13:13:51 +02:00
Makefile