<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/arch/nios2/kernel/setup.c, branch v4.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>nios2: remove custom early console implementation</title>
<updated>2017-05-11T09:44:21+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2017-05-11T09:40:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e118c3fec9c0d8d2a96462c4c035305dc952e402'/>
<id>e118c3fec9c0d8d2a96462c4c035305dc952e402</id>
<content type='text'>
As of commits d8f347ba35cf ("nios2: enable earlycon support"),
0dcc0542a006 ("serial: altera_jtaguart: add earlycon support") and
4d9d7d896d77 ("serial: altera_uart: add earlycon support"), the nios2
architecture and the altera_uart/altera_jtaguart drivers support
earlycon. Thus, the custom early console implementation for nios2 is no
longer necessary to get early boot messages. Remove it and rely fully on
earlycon support.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of commits d8f347ba35cf ("nios2: enable earlycon support"),
0dcc0542a006 ("serial: altera_jtaguart: add earlycon support") and
4d9d7d896d77 ("serial: altera_uart: add earlycon support"), the nios2
architecture and the altera_uart/altera_jtaguart drivers support
earlycon. Thus, the custom early console implementation for nios2 is no
longer necessary to get early boot messages. Remove it and rely fully on
earlycon support.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: enable earlycon support</title>
<updated>2017-05-08T08:59:19+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2017-04-03T03:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=44a4ed42576da5f3387005a1667cb3e7aedfd687'/>
<id>44a4ed42576da5f3387005a1667cb3e7aedfd687</id>
<content type='text'>
Enable generic earlycon support for nios2. This e.g. allows to use a
8250/16650 UART as earlycon.

In order to get the earlycon, we just need to call parse_early_param()
in early_init_devtree() as soon as the device tree is initially scanned.
By adding an stdout-path property to the dts (done in this patch for
10m50_devboard), the earlycon can be used.

In order to provide early printk support, we need to provide a dummy
implementation of early_console_write(), so that
arch/nios2/kernel/early_printk.c can still be compiled if neither
SERIAL_ALTERA_JTAGUART_CONSOLE nor SERIAL_ALTERA_UART_CONSOLE is
selected. As soon as the altera_uart and altera_jtaguart support
earlycon, the entire file can be removed.

Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable generic earlycon support for nios2. This e.g. allows to use a
8250/16650 UART as earlycon.

In order to get the earlycon, we just need to call parse_early_param()
in early_init_devtree() as soon as the device tree is initially scanned.
By adding an stdout-path property to the dts (done in this patch for
10m50_devboard), the earlycon can be used.

In order to provide early printk support, we need to provide a dummy
implementation of early_console_write(), so that
arch/nios2/kernel/early_printk.c can still be compiled if neither
SERIAL_ALTERA_JTAGUART_CONSOLE nor SERIAL_ALTERA_UART_CONSOLE is
selected. As soon as the altera_uart and altera_jtaguart support
earlycon, the entire file can be removed.

Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: reserve boot memory for device tree</title>
<updated>2017-04-03T03:13:57+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2017-04-03T03:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=921d701e6f31e1ffaca3560416af1aa04edb4c4f'/>
<id>921d701e6f31e1ffaca3560416af1aa04edb4c4f</id>
<content type='text'>
Make sure to reserve the boot memory for the flattened device tree.
Otherwise it might get overwritten, e.g. when initial_boot_params is
copied, leading to a corrupted FDT and a boot hang/crash:

  bootconsole [early0] enabled
  Early console on uart16650 initialized at 0xf8001600
  OF: fdt: Error -11 processing FDT
  Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!

  ---[ end Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!

Guenter Roeck says:

&gt; I think I found the problem. In unflatten_and_copy_device_tree(), with added
&gt; debug information:
&gt;
&gt; OF: fdt: initial_boot_params=c861e400, dt=c861f000 size=28874 (0x70ca)
&gt;
&gt; ... and then initial_boot_params is copied to dt, which results in corrupted
&gt; fdt since the memory overlaps. Looks like the initial_boot_params memory
&gt; is not reserved and (re-)allocated by early_init_dt_alloc_memory_arch().

Cc: stable@vger.kernel.org
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reference: http://lkml.kernel.org/r/20170226210338.GA19476@roeck-us.net
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure to reserve the boot memory for the flattened device tree.
Otherwise it might get overwritten, e.g. when initial_boot_params is
copied, leading to a corrupted FDT and a boot hang/crash:

  bootconsole [early0] enabled
  Early console on uart16650 initialized at 0xf8001600
  OF: fdt: Error -11 processing FDT
  Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!

  ---[ end Kernel panic - not syncing: setup_cpuinfo: No CPU found in devicetree!

Guenter Roeck says:

&gt; I think I found the problem. In unflatten_and_copy_device_tree(), with added
&gt; debug information:
&gt;
&gt; OF: fdt: initial_boot_params=c861e400, dt=c861f000 size=28874 (0x70ca)
&gt;
&gt; ... and then initial_boot_params is copied to dt, which results in corrupted
&gt; fdt since the memory overlaps. Looks like the initial_boot_params memory
&gt; is not reserved and (re-)allocated by early_init_dt_alloc_memory_arch().

Cc: stable@vger.kernel.org
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reference: http://lkml.kernel.org/r/20170226210338.GA19476@roeck-us.net
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched/headers: Prepare to move 'init_task' and 'init_thread_union' from &lt;linux/sched.h&gt; to &lt;linux/sched/task.h&gt;</title>
<updated>2017-03-02T07:42:38+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-04T00:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9164bb4a18dfa592cd0aca455ea57abf89ca4526'/>
<id>9164bb4a18dfa592cd0aca455ea57abf89ca4526</id>
<content type='text'>
Update all usage sites first.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update all usage sites first.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: add screen_info</title>
<updated>2016-12-13T09:13:17+00:00</updated>
<author>
<name>Ley Foon Tan</name>
<email>ley.foon.tan@intel.com</email>
</author>
<published>2016-12-07T07:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=744606c76c4a3a73eb34d21f265013426426c4b5'/>
<id>744606c76c4a3a73eb34d21f265013426426c4b5</id>
<content type='text'>
Fix build error when enable VGA console.

drivers/video/console/vgacon.c:586: undefined reference to `screen_info'

Signed-off-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix build error when enable VGA console.

drivers/video/console/vgacon.c:586: undefined reference to `screen_info'

Signed-off-by: Ley Foon Tan &lt;ley.foon.tan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: Fix unused variable warning</title>
<updated>2015-11-09T02:33:29+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2015-09-30T14:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4db2196d0c0de110779b1767d956995efefdb915'/>
<id>4db2196d0c0de110779b1767d956995efefdb915</id>
<content type='text'>
Fix the following compiler splat by adding __maybe_unused annotation to
the variable. Using this particular annotation has the least ugly impact
on the code compared to using ifdeffery.

arch/nios2/kernel/setup.c: In function 'nios2_boot_init':
arch/nios2/kernel/setup.c:107:7: warning: unused variable 'cmdline_passed' [-Wunused-variable]
  char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
       ^

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following compiler splat by adding __maybe_unused annotation to
the variable. Using this particular annotation has the least ugly impact
on the code compared to using ifdeffery.

arch/nios2/kernel/setup.c: In function 'nios2_boot_init':
arch/nios2/kernel/setup.c:107:7: warning: unused variable 'cmdline_passed' [-Wunused-variable]
  char cmdline_passed[COMMAND_LINE_SIZE] = { 0, };
       ^

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Acked-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: add early printk support</title>
<updated>2015-02-10T15:21:08+00:00</updated>
<author>
<name>Ley Foon Tan</name>
<email>lftan@altera.com</email>
</author>
<published>2015-02-10T15:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e8bf5bc776edef44777b13b2eb4461d653519bae'/>
<id>e8bf5bc776edef44777b13b2eb4461d653519bae</id>
<content type='text'>
Signed-off-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nios2: Kernel booting and initialization</title>
<updated>2014-12-08T04:55:49+00:00</updated>
<author>
<name>Ley Foon Tan</name>
<email>lftan@altera.com</email>
</author>
<published>2014-11-06T07:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=27d22413e60009603bc4eb515392c2639ff31010'/>
<id>27d22413e60009603bc4eb515392c2639ff31010</id>
<content type='text'>
This patch adds the kernel booting and the initial setup code.

Signed-off-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the kernel booting and the initial setup code.

Signed-off-by: Ley Foon Tan &lt;lftan@altera.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
