History log of /arch/arc/kernel/setup.c
Revision Date Author Comments
56372082533afb859e6d64707859349a2ee171bf 25-Sep-2014 Vineet Gupta <vgupta@synopsys.com> ARC: boot: cpu feature print enhancements

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
c4b9856b5e1eb6d4f0d226f3c48be208475fc3d7 25-Sep-2014 Vineet Gupta <vgupta@synopsys.com> ARC: boot: consolidate cross-checking of h/w and s/w

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
435abb6daf310b4c1d681097887ea7239c310732 10-Sep-2014 Vineet Gupta <vgupta@synopsys.com> ARC: RIP @running_on_hw

* No active users of this flag anymore

* flag itself was no longer usable with new simualtor which acts just like
hardware, not providing the special chip-id = 0xffff which good old
ISS used to do.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
d7f8a085d4f48501b1fa253b48ec4ad7cb4d02cc 10-Sep-2014 Vineet Gupta <vgupta@synopsys.com> ARC: [plat*] move code out of .init_machine into common

All the platforms do the same thing in init_machine callback so move it
out of callback into caller of callback

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
619f30188ff0d10fccc3cd952a79cb56ff62db54 04-Sep-2014 Vineet Gupta <vgupta@synopsys.com> ARC: Allow SMP kernel to build/boot on UP-only infrastructure

In light of recent SNAFU with SMP build, allow simple platform to build
as SMP but run UP.

* Remove the dependence on simulation SMP extension to enable quick
build/test iterations of SMP kernel.

* In absence of platform SMP registration, prevent the NULL smp feature
name from borkign the system

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
e57d339a6264355df8c98948f05a46ff2bc5d504 16-Jan-2014 Vineet Gupta <vgupta@synopsys.com> ARC: [cmdline] support External Device Trees from u-boot

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
59ed9413533897823bcdb4c79fd2904718e25b0a 16-Jan-2014 Vineet Gupta <vgupta@synopsys.com> ARC: [cmdline] uboot cmdline handling rework

* Moved cmdline copy from asm to "C" - allows for more robust checking
of pointer validity etc.

* Remove the Kconfig option to do so, base it on a runtime value passed
by u-boot

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8e457d6a75421372c7721388c46d21381fd5b451 04-Sep-2013 Vineet Gupta <vgupta@synopsys.com> ARC: Annotate some functions as static

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
be5973117bd48624d9e7d7728d754f4c9a322193 08-Sep-2013 Rob Herring <rob.herring@calxeda.com> arc: remove unnecessary prom.h includes

Remove unnecessary prom.h includes in preparation to remove prom.h.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
880beb8807814c7785680bcbdc81dcf076f585db 28-Aug-2013 Rob Herring <rob.herring@calxeda.com> arc: use common of_flat_dt_match_machine

Convert arc to use the common of_flat_dt_match_machine function.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
1efc959e0b28942d69d3084ecd4e9bde3beb9866 26-Aug-2013 Rob Herring <rob.herring@calxeda.com> arc: use unflatten_and_copy_device_tree

Use the common unflatten_and_copy_device_tree to copy the built-in FDT
out of init section.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
c3567f8a359b7917dcffa442301f88ed0a75211f 12-Sep-2013 Noam Camus <noamc@ezchip.com> ARC: SMP failed to boot due to missing IVT setup

Commit 05b016ecf5e7a "ARC: Setup Vector Table Base in early boot" moved
the Interrupt vector Table setup out of arc_init_IRQ() which is called
for all CPUs, to entry point of boot cpu only, breaking booting of others.

Fix by adding the same to entry point of non-boot CPUs too.

read_arc_build_cfg_regs() printing IVT Base Register didn't help the
casue since it prints a synthetic value if zero which is totally bogus,
so fix that to print the exact Register.

[vgupta: Remove the now stale comment from header of arc_init_IRQ and
also added the commentary for halt-on-reset]

Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Cc: <stable@vger.kernel.org> #3.11
Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8508d5653f4ca25cd13f87340121afdfed448e1b 28-Aug-2013 Mischa Jonker <mjonker@synopsys.com> ARC: remove console_verbose() from setup_arch()

It prevents kernel parameters such as 'loglevel' from doing their job.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
ce7599567e27eabc1003e35b6f05579268dafecd 24-Jun-2013 Paul Gortmaker <paul.gortmaker@windriver.com> arc: delete __cpuinit usage from all arc files

The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings. In any case, they are temporary and harmless.

This removes all the arch/arc uses of the __cpuinit macros from
all C files. Currently arc does not have any __CPUINIT used in
assembly files.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8235703e103579bdcedadcaf63bc1896f82b191b 31-May-2013 Vineet Gupta <vgupta@synopsys.com> ARC: Use kconfig helper IS_ENABLED() to get rid of defines.h

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9593a933d538a726b341cb06b3362d74931aa281 09-Apr-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [cmdline] Don't overwrite u-boot provided bootargs

The existing code was wrong on several counts:

* uboot provided bootargs were copied into @boot_command_line, only to
be over-written by setup_machine_fdt(), effectively lost

* @cmdline_p returned by setup_arch() to start_kernel() didn't include
the DT /bootargs

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
6971881f2ae0e0208375dc40e1a9a4ce56f7c9d6 09-Apr-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [cmdline] Remove CONFIG_CMDLINE

Given that DeviceTree /bootargs can provide similar functionality,
no point in providing duplicate infrastructure.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
30ecee8cdd05415e5602bd755d9210e1c5a5b64d 09-Apr-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [build] Fix warnings with CONFIG_DEBUG_SECTION_MISMATCH

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
e420c82d09b07c12902530f03a26a84e2e59082d 06-Mar-2013 Sachin Kamat <sachin.kamat@linaro.org> ARC: Remove duplicate inclusion of header files

Some header files were included twice in the same file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1ec9db1056b0c4b8b9dfca4736634c7c8e0833d5 06-Mar-2013 Sachin Kamat <sachin.kamat@linaro.org> ARC: Use <linux/*> headers instead of <asm/*>

Silences the following checkpatch warnings:
WARNING: Use #include <linux/ptrace.h> instead of <asm/ptrace.h>
WARNING: Use #include <linux/kprobes.h> instead of <asm/kprobes.h>
WARNING: Use #include <linux/kgdb.h> instead of <asm/kgdb.h>
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
WARNING: Use #include <linux/cache.h> instead of <asm/cache.h>

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
8ff14bbc6a2083e83c6d387d025fb67ba639807c 06-Mar-2013 Vineet Gupta <vgupta@synopsys.com> ARC: ABIv3: Print the correct ABI ver

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
eab6a08c082b82dff884eb49a2229b0474d0b7e5 21-Feb-2013 Vineet Gupta <vgupta@synopsys.com> ARC: make a copy of flat DT

The flat DT (currently embedded in vmlinux) is in .init section.
The unflattened/binary tree doesn't copy strings through and references
them from orig flat DT - which could cause catestrohpy if of_* APIs are
called post init, say from a driver which is a loadable module.

Reported-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
877768c84d6ca8f7dedafff0e44615a12e82f8f4 23-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [Review] Multi-platform image #3: switch to board callback

-platform API is retired and instead callbacks are used

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
03a6d28cdddfbd11b338c23e7fe51d0816b9bdef 18-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [Review] Multi-platform image #2: Board callback Infrastructure

The orig platform code orgnaization was singleton design pattern - only
one platform (and board thereof) would build at a time.

Thus any platform/board specific code (e.g. irq init, early init ...)
expected by ARC common code was exported as well defined set of APIs,
with only ONE instance building ever.

Now with multiple-platform build requirement, that design of code no
longer holds - multiple board specific calls need to build at the same
time - so ARC common code can't use the API approach, it needs a
callback based design where each board registers it's specific set of
functions, and at runtime, depending on board detection, the callbacks
are used from the registry.

This commit adds all the infrastructure, where board specific callbacks
are specified as a "maThine description".

All the hooks are placed in right spots, no board callbacks registered
yet (with MACHINE_STARt/END constructs) so the hooks will not run.

Next commit will actually convert the platform to this infrastructure.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
8b5850f8ac8d9b809db4588b80b568faca5aaaaf 18-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: Support for single cycle Close Coupled Mem (CCM)

* Includes mapping of CCMs in address space
* Annotations to move arbitrary code/data into CCM
* Moving some of the critical code/data into CCM
* Runtime detection/reporting

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
af61742813aa9dde65ca796801e36d03b83fa79f 18-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: Boot #2: Verbose Boot reporting / feature verification

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
854a0d95056c265d96cb449bc97bc5ef9bbed835 22-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: DWARF2 .debug_frame based stack unwinder

-Originally written by Rajeshwar Ranga
-Derived off of generic unwinder in 2.6.19 and adapted to ARC

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
41195d236e84458bebd4fdc218610a92231ac791 18-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: SMP support

ARC common code to enable a SMP system + ISS provided SMP extensions.

ARC700 natively lacks SMP support, hence some of the core features are
are only enabled if SoCs have the necessary h/w pixie-dust. This
includes:
-Inter Processor Interrupts (IPI)
-Cache coherency
-load-locked/store-conditional
...

The low level exception handling would be completely broken in SMP
because we don't have hardware assisted stack switching. Thus a fair bit
of this code is repurposing the MMU_SCRATCH reg for event handler
prologues to keep them re-entrant.

Many thanks to Rajeshwar Ranga for his initial "major" contributions to
SMP Port (back in 2008), and to Noam Camus and Gilad Ben-Yossef for help
with resurrecting that in 3.2 kernel (2012).

Note that this platform code is again singleton design pattern - so
multiple SMP platforms won't build at the moment - this deficiency is
addressed in subsequent patches within this series.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rajeshwar Ranga <rajeshwar.ranga@gmail.com>
Cc: Noam Camus <noamc@ezchip.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
999159a5381bff3bd6f688c5d20fbec9d8789e53 22-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: [DeviceTree] Basic support

This is minimal infrastructure needed for devicetree work.
It uses an a sample "skeleton" devicetree - embedded in kernel image -
to print the board, manufacturer by parsing the top-level "compatible"
string.

As of now we don't need any additional "board" specific "machine_desc".

TODO: support interpreting the command line as boot-loader passed dtb

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
c121c5063c0674fad6811f0b0d86ec3bc6eecbbd 18-Jan-2013 Vineet Gupta <vgupta@synopsys.com> ARC: Boot #1: low-level, setup_arch(), /proc/cpuinfo, mem init

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>