Age | Commit message (Collapse) | Author |
|
In order to use the SPI nor framework to detect NOR flash.
Signed-off-by: Mingkai.Hu <Mingkai.Hu@freescale.com>
Change-Id: I5f7b42316cefb618278d739c212bd7cbd4833e9c
Reviewed-on: http://git.am.freescale.net:8181/23450
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
- enable CONFIG_RTC_DRV_DS1307 to support DS1339 RTC for T1024RDB.
- enable CONFIG_I2C_MUX and CONFIG_I2C_MUX_PCA954x for T102x/T104x QDS/RDB.
- enable CONFIG_MTD_SPI_NOR_BASE and update compatible to "micron,n25q512ax3"
for SPI flash on T102xRDB and T104xRDB.
- fix typo for CONFIG_SENSORS_LM90.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Change-Id: I3506779d51192d2bfaa28a3f863c019b612b6f96
Reviewed-on: http://git.am.freescale.net:8181/23525
Reviewed-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Change-Id: Iaf58815549266cde2d082e789c34a975259d854f
Reviewed-on: http://git.am.freescale.net:8181/23497
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Tested-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
Change-Id: I2f9c391df5ddca31a49a0a3ac0cba380722b7cf0
Reviewed-on: http://git.am.freescale.net:8181/23440
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
Change-Id: Ifc1ab666fe1ad16c4f01cbf74b088d8df4663e49
Reviewed-on: http://git.am.freescale.net:8181/23439
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yuantian Tang <yuantian.tang@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Change-Id: I5c7000288297384a04f33906e668f520bafc00d8
Reviewed-on: http://git.am.freescale.net:8181/23308
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com>
Reviewed-by: Roy Pledge <roy.pledge@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
For LPAE, we have the following means for encoding writable or dirty
ptes:
L_PTE_DIRTY L_PTE_RDONLY
!pte_dirty && !pte_write 0 1
!pte_dirty && pte_write 0 1
pte_dirty && !pte_write 1 1
pte_dirty && pte_write 1 0
So we can't distinguish between writeable clean ptes and read only
ptes. This can cause problems with ptes being incorrectly flagged as
read only when they are writeable but not dirty.
This patch renumbers L_PTE_RDONLY from AP[2] to a software bit #58,
and adds additional logic to set AP[2] whenever the pte is read only
or not dirty. That way we can distinguish between clean writeable ptes
and read only ptes.
HugeTLB pages will use this new logic automatically.
We need to add some logic to Transparent HugePages to ensure that they
correctly interpret the revised pgprot permissions (L_PTE_RDONLY has
moved and no longer matches PMD_SECT_AP2). In the process of revising
THP, the names of the PMD software bits have been prefixed with L_ to
make them easier to distinguish from their hardware bit counterparts.
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit ded9477984690d026e46dd75e8157392cea3f13f)
Conflicts:
arch/arm/mm/dump.c
Change-Id: Ia71696dc811c7aeb8596334a26e67c24813a039f
Reviewed-on: http://git.am.freescale.net:8181/23333
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
Long descriptors on ARM are 64 bits, and some pte functions such as
pte_dirty return a bitwise-and of a flag with the pte value. If the
flag to be tested resides in the upper 32 bits of the pte, then we run
into the danger of the result being dropped if downcast.
For example:
gather_stats(page, md, pte_dirty(*pte), 1);
where pte_dirty(*pte) is downcast to an int.
This patch introduces a new macro pte_isset which performs the bitwise
and, then performs a double logical invert (where needed) to ensure
predictable downcasting. The logical inverse pte_isclear is also
introduced.
Equivalent pmd functions for Transparent HugePages have also been
added.
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit f2950706871c4b6e8c0f0d7c3f62d35930b8de63)
Change-Id: I2d17ab87a364a3e839c71fab3f4507e722288daf
Reviewed-on: http://git.am.freescale.net:8181/23332
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
|
|
The pte_accessible macro can be used to identify page table entries
capable of being cached by a TLB. In principle, this differs from
pte_present, since PROT_NONE mappings are mapped using invalid entries
identified as present and ptes designated as `old' can use either
invalid entries or those with the access flag cleared (guaranteed not to
be in the TLB). However, there is a race to take care of, as described
in 20841405940e ("mm: fix TLB flush race between migration, and
change_protection_range"), between a page being migrated and mprotected
at the same time. In this case, we can check whether a TLB invalidation
is pending for the mm and if so, temporarily consider PROT_NONE mappings
as valid.
This patch implements a quick pte_accessible macro for ARM by simply
checking if the pte is valid/present depending on the mm. For classic
MMU, these checks are identical and will generate some false positives
for PROT_NONE mappings, but this is better than the current asm-generic
definition of ((void)(pte),1).
Finally, pte_present_user is moved to use pte_valid (and renamed
appropriately) since we don't care about cache flushing for faulting
mappings.
Acked-by: Steve Capper <steve.capper@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 1971188aa19651d8f447211c6535fb68661d77c5)
Change-Id: I27ad2dbe398483d18ebb587e7c1e65b198421070
Reviewed-on: http://git.am.freescale.net:8181/23331
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Tested-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
When enable LPAE and big-endian in a hisilicon board, while specify
mem=384M mem=512M@7680M, will get bad page state:
Freeing unused kernel memory: 180K (c0466000 - c0493000)
BUG: Bad page state in process init pfn:fa442
page:c7749840 count:0 mapcount:-1 mapping: (null) index:0x0
page flags: 0x40000400(reserved)
Modules linked in:
CPU: 0 PID: 1 Comm: init Not tainted 3.10.27+ #66
[<c000f5f0>] (unwind_backtrace+0x0/0x11c) from [<c000cbc4>] (show_stack+0x10/0x14)
[<c000cbc4>] (show_stack+0x10/0x14) from [<c009e448>] (bad_page+0xd4/0x104)
[<c009e448>] (bad_page+0xd4/0x104) from [<c009e520>] (free_pages_prepare+0xa8/0x14c)
[<c009e520>] (free_pages_prepare+0xa8/0x14c) from [<c009f8ec>] (free_hot_cold_page+0x18/0xf0)
[<c009f8ec>] (free_hot_cold_page+0x18/0xf0) from [<c00b5444>] (handle_pte_fault+0xcf4/0xdc8)
[<c00b5444>] (handle_pte_fault+0xcf4/0xdc8) from [<c00b6458>] (handle_mm_fault+0xf4/0x120)
[<c00b6458>] (handle_mm_fault+0xf4/0x120) from [<c0013754>] (do_page_fault+0xfc/0x354)
[<c0013754>] (do_page_fault+0xfc/0x354) from [<c0008400>] (do_DataAbort+0x2c/0x90)
[<c0008400>] (do_DataAbort+0x2c/0x90) from [<c0008fb4>] (__dabt_usr+0x34/0x40)
The bad pfn:fa442 is not system memory(mem=384M mem=512M@7680M), after debugging,
I find in page fault handler, will get wrong pfn from pte just after set pte,
as follow:
do_anonymous_page()
{
...
set_pte_at(mm, address, page_table, entry);
//debug code
pfn = pte_pfn(entry);
pr_info("pfn:0x%lx, pte:0x%llxn", pfn, pte_val(entry));
//read out the pte just set
new_pte = pte_offset_map(pmd, address);
new_pfn = pte_pfn(*new_pte);
pr_info("new pfn:0x%lx, new pte:0x%llxn", pfn, pte_val(entry));
...
}
pfn: 0x1fa4f5, pte:0xc00001fa4f575f
new_pfn:0xfa4f5, new_pte:0xc00000fa4f5f5f //new pfn/pte is wrong.
The bug is happened in cpu_v7_set_pte_ext(ptep, pte):
An LPAE PTE is a 64bit quantity, passed to cpu_v7_set_pte_ext in the r2 and r3 registers.
On an LE kernel, r2 contains the LSB of the PTE, and r3 the MSB.
On a BE kernel, the assignment is reversed.
Unfortunately, the current code always assumes the LE case,
leading to corruption of the PTE when clearing/setting bits.
This patch fixes this issue much like it has been done already in the
cpu_v7_switch_mm case.
CC stable <stable@vger.kernel.org>
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 86f40622af7329375e38f282f6c0aab95f3e5f72)
Change-Id: If59198ba23237cc9cb98fa357795c6fece20666a
Reviewed-on: http://git.am.freescale.net:8181/23330
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
- add CONFIG_FMAN_V3L by default for FMan_V3L platform.
- t1024 officially supports 6 portals of QMan/BMan instead of 10
- remove CONFIG_ALTIVEC as e5500 core has no ALTIVEC.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Change-Id: I71a5426ad441ef034c66e2d794a86b366092530d
Reviewed-on: http://git.am.freescale.net:8181/23188
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
Kernel could not get cluster information from device tree on PowerPC.
The previous way of cluster calculation could be wrong if all cores of
some clusters are disabled. For now PCL10 is only supported on e6500
cores. We hard coded the threads number of each cluster to ensure the
cluster calculation is right.
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
Change-Id: Ia329e48bac1a838828146df9b2caa7f527e329eb
Reviewed-on: http://git.am.freescale.net:8181/23177
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yuantian Tang <yuantian.tang@freescale.com>
Reviewed-by: Zhuoyu Zhang <Zhuoyu.Zhang@freescale.com>
Reviewed-by: Yang Li <LeoLi@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
|
|
LAW and MP information need to be backed up, or they will
lost when deep sleep wake up.
Previously, this is done by uboot. Now moved it to kernel
because entry point to kernel when resume is pretty early
in uboot.
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Change-Id: I4542ddc77bd8d3461cf2e8bf02abeb74fa89e741
Reviewed-on: http://git.am.freescale.net:8181/23147
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Reviewed-by: Yang Li <LeoLi@freescale.com>
|
|
|
|
* set the bit 0 of the target address of long jump to 1 for THUMB mode
* compile the resume entry code in arm instruction set
Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Change-Id: I01a96158ac39e14dcaebc7305b03eb277712011b
Reviewed-on: http://git.am.freescale.net:8181/23209
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Remove the workaround which disables qe for deepsleep.
qe blocked deepsleep, so the workaround was added,
Now the qe can work with deepsleep, so remove it.
Signed-off-by: Zhao Qiang <B45475@freescale.com>
Change-Id: I0f1ef2ec45b2ee8129c6ab958162f432d8a76c5d
Reviewed-on: http://git.am.freescale.net:8181/23143
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Xiaobo Xie <X.Xie@freescale.com>
Reviewed-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
This patch enables some device drivers and functions on LS1021A
QDS/TWR boards: PCIe, CPU frequency, Power Management, SPI, SAI audio,
DCU framebuffer, DVI/HDMI, USB3.0, PWM, CAAM.
Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
Change-Id: I122a248490de5c80538fbced40e6c4e7a9db9ccd
Reviewed-on: http://git.am.freescale.net:8181/23176
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yuantian Tang <yuantian.tang@freescale.com>
Reviewed-by: Hongtao Jia <hongtao.jia@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Including: P3041DS P5020DS P5040DS B4QDS
The kernel config for this device is CONFIG_SENSORS_INA2XX.
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
(cherry picked from commit bb192142c33657ec9f2e667878766031514829db)
Signed-off-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Conflicts:
arch/powerpc/boot/dts/b4qds.dtsi
|
|
Including: T1040RDB T1042RDB T208xQDS T208xRDB B4QDS T4240QDS
For T208xRDB and T4240QDS, ADT7481 is used. But kernel now only supports
ADT7461. So for now ADT7481 is treated as ADT7461.
The kernel config for thermal monitor is CONFIG_SENSORS_LM90.
Signed-off-by: Jia Hongtao <hongtao.jia@freescale.com>
Change-Id: Ifae889c238fd53e0abc3b75516e484f1ccf6e659
Reviewed-on: http://git.am.freescale.net:8181/23080
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Yang Li <LeoLi@freescale.com>
Reviewed-by: Yuantian Tang <yuantian.tang@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
CONFIG_MEMORY is required for IFC
Signed-off-by: Jaiprakash Singh <b44839@freescale.com>
Change-Id: I6605a908a4ee2bd0e8ef5b4f81456ee697138c63
Reviewed-on: http://git.am.freescale.net:8181/22565
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
|
|
which has 8KB CCSR memory space instead of 4KB on QMan rev1.
Change back 4KB CCSR memory space for QMan rev1 and rev2, then
update soc *-post device trees for those SoCs which have QMan v3.
Change-Id: I5878c1b87430c5f7f6f098399d7d55202109adcf
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/22072
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
|
|
|
|
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
---
upstream link of the patch:
http://patchwork.ozlabs.org/patch/400406/
Change-Id: I55e42d2515bcd35d0bc5198cb13d5ed91850b50e
Reviewed-on: http://git.am.freescale.net:8181/22796
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Remove qspi the second flash support for LS1 SDK.
The QSPI driver was back-ported from the upstream QSPI driver. The
upstream version does not support the reading/writing for the second
flash chip. This patch removed the second flash support to avoid error information during kernel bringup.
Signed-off-by: Chao Fu <B44548@freescale.com>
Change-Id: I57b02083ebe8e9a34673243be74d8cfd1c80aa9d
Reviewed-on: http://git.am.freescale.net:8181/22587
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Jingchang Lu <jingchang.lu@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Added the compatible "simple-bus" to fix the problem.
Change-Id: I629a6f5c54f51dbe18c65c2ff8cdc6e97bb0ed0f
Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/22481
Reviewed-by: Jingchang Lu <jingchang.lu@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Commit 1fcf7ce0c602 (arm: kvm: implement CPU PM notifier) added
support for CPU power-management, using a cpu_notifier to re-init
KVM on a CPU that entered CPU idle.
The code assumed that a CPU entering idle would actually be powered
off, loosing its state entierely, and would then need to be
reinitialized. It turns out that this is not always the case, and
some HW performs CPU PM without actually killing the core. In this
case, we try to reinitialize KVM while it is still live. It ends up
badly, as reported by Andre Przywara (using a Calxeda Midway):
[ 3.663897] Kernel panic - not syncing: unexpected prefetch abort in Hyp mode at: 0x685760
[ 3.663897] unexpected data abort in Hyp mode at: 0xc067d150
[ 3.663897] unexpected HVC/SVC trap in Hyp mode at: 0xc0901dd0
The trick here is to detect if we've been through a full re-init or
not by looking at HVBAR (VBAR_EL2 on arm64). This involves
implementing the backend for __hyp_get_vectors in the main KVM HYP
code (rather small), and checking the return value against the
default one when the CPU notifier is called on CPU_PM_EXIT.
Reported-by: Andre Przywara <osp@andrep.de>
Tested-by: Andre Przywara <osp@andrep.de>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Rob Herring <rob.herring@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit b20c9f29c5c25921c6ad18b50d4b61e6d181c3cc)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I3f123215dfd2673e3abae201b6e75c11ac9cfe63
Reviewed-on: http://git.am.freescale.net:8181/22059
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
unmap_range() was utterly broken, to quote Marc, and broke in all sorts
of situations. It was also quite complicated to follow and didn't
follow the usual scheme of having a separate iterating function for each
level of page tables.
Address this by refactoring the code and introduce a pgd_clear()
function.
Reviewed-by: Jungseok Lee <jays.lee@samsung.com>
Reviewed-by: Mario Smarduch <m.smarduch@samsung.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 4f853a714bf16338ff5261128e6c7ae2569e9505)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I478878114142926836b4f6674c4a04cb94b23955
Reviewed-on: http://git.am.freescale.net:8181/22058
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
This patch adds support for running Cortex-A7 guests on Cortex-A7 hosts.
As Cortex-A7 is architecturally compatible with A15, this patch is largely just
generalising existing code. Areas where 'implementation defined' behaviour
is identical for A7 and A15 is moved to allow it to be used by both cores.
The check to ensure that coprocessor register tables are sorted correctly is
also moved in to 'common' code to avoid each new cpu doing its own check
(and possibly forgetting to do so!)
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit e8c2d99f8277d68d28a9f99d16289712bc2aee7f)
Conflicts:
arch/arm/kvm/reset.c
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Id420a5e767cb428dc5b9735673c87ef97322c8df
Reviewed-on: http://git.am.freescale.net:8181/22057
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Upon CPU shutdown and consequent warm-reboot, the hypervisor CPU state
must be re-initialized. This patch implements a CPU PM notifier that
upon warm-boot calls a KVM hook to reinitialize properly the hypervisor
state so that the CPU can be safely resumed.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
(cherry picked from commit 1fcf7ce0c60213994269fb59569ec161eb6e08d6)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I09e329449b8e5e767cdfec1000f2c8f82193a0b8
Reviewed-on: http://git.am.freescale.net:8181/22056
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The ARM architected timer driver doesn't compile without
GENERIC_CLOCKEVENTS selected, so ensure that we select it when building
for a platform that has the timer.
Without this patch, mach-virt fails to build without something like
mach-vexpress also selected.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 0c403462d6822227ea37fb0293a3e9f511e6929f)
Change-Id: I349317968df072d8539702adcf376e4bea4b43cb
Reviewed-on: http://git.am.freescale.net:8181/22055
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Ia801e4e9ee128b35a5ec0fad42c71e2b91e4e808
Reviewed-on: http://git.am.freescale.net:8181/22054
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The use of p*d_addr_end with stage-2 translation is slightly dodgy,
as the IPA is 40bits, while all the p*d_addr_end helpers are
taking an unsigned long (arm64 is fine with that as unligned long
is 64bit).
The fix is to introduce 64bit clean versions of the same helpers,
and use them in the stage-2 page table code.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit a3c8bd31af260a17d626514f636849ee1cd1f63e)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I1db223265c876a17edbc79777f59479f12bafa19
Reviewed-on: http://git.am.freescale.net:8181/22053
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The mach-virt machine is entirely specified by device tree.
However the kernel does not initialize the clocks from device tree
and it will refuse to probe the PL011 console.
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I5f90396a872f2db9a0164cd003babaf9b8efdcad
Reviewed-on: http://git.am.freescale.net:8181/22052
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Compiling with THP enabled leads to the following warning:
arch/arm/kvm/mmu.c: In function ‘unmap_range’:
arch/arm/kvm/mmu.c:177:39: warning: ‘pte’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (kvm_pmd_huge(*pmd) || page_empty(pte)) {
^
Code inspection reveals that these two cases are mutually exclusive,
so GCC is a bit overzealous here. Silence it anyway by initializing
pte to NULL and testing it later on.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 56041bf920d2937b7cadcb30cb206f0372eee814)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Ie4c704ea6441c405cd409cc6a2b1e833936a2df4
Reviewed-on: http://git.am.freescale.net:8181/22051
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit ef0cfe71c2b1710cd4ae747537e36c56f9a26ccf)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I962079f2935ab652bedffc64f038e269bcd1986e
Reviewed-on: http://git.am.freescale.net:8181/22050
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The KVM_HPAGE_DEFINES are a little artificial on ARM, since the huge
page size is statically defined at compile time and there is only a
single huge page size.
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit dc6f6763dfeaf2dfec906bb78875dcea162accd9)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I057413e3c7268842e6e12b0b158c1c498da0cb58
Reviewed-on: http://git.am.freescale.net:8181/22049
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit bbba7938d181bdd0b02a5fbbc7b7391b1d8f44e7)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I4350d56598097538f842c5022e9a56e2da9474d0
Reviewed-on: http://git.am.freescale.net:8181/22048
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit 015e0513a07467b34bb3a466ec5f5156765770dc)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I0d1857814eb76415cdee4cd843d7aad3e39741bf
Reviewed-on: http://git.am.freescale.net:8181/22047
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit 2c5350e934501f1af8010c608d8dbf72ad25fdc6)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Ia80e905cb81e7c88e82b5efd64f5f81eb3f4aa83
Reviewed-on: http://git.am.freescale.net:8181/22046
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Now when the main kvm code relying on these defines has been moved to
the x86 specific part of the world, we can get rid of these.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit a7efdf6bec34f1a693a926ebd08de6ba6e700dff)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Ic5c8c659116031969bbf7912fd3b8eae00cb633f
Reviewed-on: http://git.am.freescale.net:8181/22045
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Support transparent huge pages in KVM/ARM and KVM/ARM64. The
transparent_hugepage_adjust is not very pretty, but this is also how
it's solved on x86 and seems to be simply an artifact on how THPs
behave. This should eventually be shared across architectures if
possible, but that can always be changed down the road.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 9b5fdb9781f74fb15827e465bfb5aa63211953c8)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I0a35b3b7cbb482b0fd8ad828c6db2a5e7b59869f
Reviewed-on: http://git.am.freescale.net:8181/22044
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Support huge pages in KVM/ARM and KVM/ARM64. The pud_huge checking on
the unmap path may feel a bit silly as the pud_huge check is always
defined to false, but the compiler should be smart about this.
Note: This deals only with VMAs marked as huge which are allocated by
users through hugetlbfs only. Transparent huge pages can only be
detected by looking at the underlying pages (or the page tables
themselves) and this patch so far simply maps these on a page-by-page
level in the Stage-2 page tables.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit ad361f093c1e31d0b43946210a32ab4ff5c49850)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I74ce26713f4720f8024692664ebfb14a364bd84d
Reviewed-on: http://git.am.freescale.net:8181/22043
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Tested-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The gfn_to_index function relies on huge page defines which either may
not make sense on systems that don't support huge pages or are defined
in an unconvenient way for other architectures. Since this is
x86-specific, move the function to arch/x86/include/asm/kvm_host.h.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
(cherry picked from commit 6d9d41e57440e32a3400f37aa05ef7a1a09ced64)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Iaf39a658cb1300b06dd59e1b84aa6f8c173cf948
Reviewed-on: http://git.am.freescale.net:8181/22042
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
KVM does not have a notion of multiple clusters for CPUs, just a linear
array of CPUs. When using a system with cores in more than one cluster, the
current method for calculating the virtual MPIDR will leak the (physical)
cluster information into the virtual MPIDR. One effect of this is that
Linux under KVM fails to boot multiple CPUs that aren't in the 0th cluster.
This patch does away with exposing the real MPIDR fields in favour of simply
using the virtual CPU number (but preserving the U bit, as before).
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 1158fca401e09665c440a9fe4fd4f131ee85c13b)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Iaf8b973671e1ea2a203fb2d69c3c8aa9cafbf91f
Reviewed-on: http://git.am.freescale.net:8181/22041
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
For implementing CPU=host, we need a mechanism for querying
preferred VCPU target type on underlying Host.
This patch implements KVM_ARM_PREFERRED_TARGET vm ioctl which
returns struct kvm_vcpu_init instance containing information
about preferred VCPU target type and target specific features
available for it.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 42c4e0c77ac91505ab94284b14025e3a0865c0a5)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: Iaace1d63c4bd6f66b7808f4b8e9201b8326ed4ee
Reviewed-on: http://git.am.freescale.net:8181/22039
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
This patch implements kvm_vcpu_preferred_target() function for
KVM ARM64 which will help us implement KVM_ARM_PREFERRED_TARGET
ioctl for user space.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 473bdc0e6565ebb22455657a40daa21b6b4ee16b)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: If4340022e8f7f396eeb760c9f6c0aa46225e3315
Reviewed-on: http://git.am.freescale.net:8181/22038
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
This patch implements kvm_vcpu_preferred_target() function for
KVM ARM which will help us implement KVM_ARM_PREFERRED_TARGET ioctl
for user space.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 4a6fee805d5e278e4733bf933cb5b184b7a8be1f)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I10beaa7f4275742c9f86ba957a7d70adcf5babb0
Reviewed-on: http://git.am.freescale.net:8181/22037
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
The T{0,1}SZ fields of TTBCR are 3 bits wide when using the long descriptor
format. Likewise, the T0SZ field of the HTCR is 3-bits. KVM currently
defines TTBCR_T{0,1}SZ as 3, not 7.
The T0SZ mask is used to calculate the value for the HTCR, both to pick out
TTBCR.T0SZ and mask off the equivalent field in the HTCR during
read-modify-write. The incorrect mask size causes the (UNKNOWN) reset value
of HTCR.T0SZ to leak in to the calculated HTCR value. Linux will hang when
initializing KVM if HTCR's reset value has bit 2 set (sometimes the case on
A7/TC2)
Fixing T0SZ allows A7 cores to boot and T1SZ is also fixed for completeness.
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 5e497046f005528464f9600a4ee04f49df713596)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I1c5fc3e65d8821f50fab529ab1ff320cc10b9649
Reviewed-on: http://git.am.freescale.net:8181/22036
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|
|
Very minor typo in comments of inject_abt() when we update fault status
register for injecting prefetch abort.
Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit b373e492f3a3469c615c2ae218d2f723900bf981)
Signed-off-by: Diana Craciun <Diana.Craciun@freescale.com>
Change-Id: I4932dd95838b11a832209328dd59cbf2e43b298c
Reviewed-on: http://git.am.freescale.net:8181/22035
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
|