SMSM is not symmetrical, the incoming bits from WCNSS are available at
index 6, but the outgoing host id for WCNSS is 3. Further more, upstream
references the base of APCS (in contrast to downstream), so the register
offset of 8 must be included.
Fixes: 1fb47e0a9ba4 ("arm64: dts: qcom: msm8916: Add smsm and smp2p nodes")
Cc: stable(a)vger.kernel.org
Reported-by: Ramon Fried <rfried(a)codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson(a)linaro.org>
---
arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 9fb317853a5c..a8e1e3b4562c 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1437,8 +1437,8 @@
#address-cells = <1>;
#size-cells = <0>;
- qcom,ipc-1 = <&apcs 0 13>;
- qcom,ipc-6 = <&apcs 0 19>;
+ qcom,ipc-1 = <&apcs 8 13>;
+ qcom,ipc-3 = <&apcs 8 19>;
apps_smsm: apps@0 {
reg = <0>;
--
2.15.0
Hi Greg,
At 10/05/2017 04:30 PM, gregkh(a)linuxfoundation.org wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> x86/acpi: Restore the order of CPU IDs
>
> to the 4.9-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
>
Dao found a bug in Linux 4.9 LTS which shows below.
The reason of the bug is that we just backport the patch titled
x86/acpi: Restore the order of CPU IDs
but, ignored the other patches in the series[1].
IMO, the commit c962cff17dfa
("Revert "x86/acpi: Set persistent cpuid <-> nodeid mapping when
booting"")
in the series can fixed this bug. I suggest to backport it.
BTW, I read the rules in Documentation/process/stable-kernel-rules.rst,
and found that:
...
- It cannot be bigger than 100 lines, with context.
...
I guess it seems that it's the reason why it did not be pulled in
stable tree. Is it right? Can you tell more details about it. :-)
[1] https://lkml.org/lkml/2017/3/3/71
Thanks,
dou.
...
[ 3.210401] BUG: unable to handle kernel NULL pointer dereference at
(null)
[ 3.219161] IP: [<ffffffffa5e77158>] __queue_work+0x78/0x420
[ 3.225491] PGD 0 [ 3.227537]
[ 3.229205] Oops: 0000 [#1] SMP
[ 3.232707] Modules linked in:
[ 3.236124] CPU: 25 PID: 1 Comm: swapper/0 Not tainted
4.9.59-cloudflare-2017.10.3 #1
[ 3.244857] Hardware name: IBM x3630M4 -[7158OCN]-/00KF922, BIOS
-[BEE142AUS-1.71]- 07/30/2014
[ 3.254461] task: ffff8dc2b2281e00 task.stack: ffffaa348c474000
[ 3.261068] RIP: 0010:[<ffffffffa5e77158>] [<ffffffffa5e77158>]
__queue_work+0x78/0x420
[ 3.270112] RSP: 0000:ffffaa348c477cb0 EFLAGS: 00010046
[ 3.276039] RAX: 0000000000000000 RBX: 0000000000000000 RCX:
0000000000000000
[ 3.284002] RDX: ffff8dc2b0272000 RSI: 000000007fffffff RDI:
ffff8dc2b0272000
[ 3.291965] RBP: ffffaa348c477ce8 R08: 000000000001b3a0 R09:
ffff8dc2be807840
[ 3.299929] R10: 0000000000ffff0a R11: 0000000000000003 R12:
ffff8dc2b0272000
[ 3.307894] R13: 0000000000000200 R14: ffff8dc2be8a2000 R15:
0000000000013198
[ 3.315857] FS: 0000000000000000(0000) GS:ffff8dc2bf440000(0000)
knlGS:0000000000000000
[ 3.324890] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3.331301] CR2: 0000000000000000 CR3: 00000001a2c07000 CR4:
00000000001406e0
[ 3.339264] Stack:
[ 3.341505] ffff8dc2afcea000 0000001900000800 0000000000000246
0000000000000000
[ 3.349801] 0000000000000000 ffffffffa686bdbd ffff8dc2b13e39c0
ffffaa348c477d00
[ 3.358094] ffffffffa5e77519 ffff8dc2b0272000 ffffaa348c477d40
ffffffffa5e73eae
[ 3.366390] Call Trace:
[ 3.369121] [<ffffffffa5e77519>] queue_work_on+0x19/0x30
[ 3.375146] [<ffffffffa5e73eae>] call_usermodehelper_exec+0x7e/0x130
[ 3.382337] [<ffffffffa6242157>] kobject_uevent_env+0x4b7/0x510
[ 3.389033] [<ffffffffa62421bb>] kobject_uevent+0xb/0x10
[ 3.395058] [<ffffffffa62416e9>] kset_register+0x59/0x70
[ 3.401086] [<ffffffffa63268b0>] bus_register+0xd0/0x260
[ 3.407114] [<ffffffffa6bdd7bf>] ? acpi_int340x_thermal_init+0x12/0x12
[ 3.414496] [<ffffffffa6bdd7cf>] pnp_init+0x10/0x12
[ 3.420039] [<ffffffffa5e00440>] do_one_initcall+0x50/0x180
[ 3.426357] [<ffffffffa6b97077>] kernel_init_freeable+0x1a2/0x22a
[ 3.433258] [<ffffffffa655df40>] ? rest_init+0x80/0x80
[ 3.439089] [<ffffffffa655df4e>] kernel_init+0xe/0x100
[ 3.444921] [<ffffffffa6564da2>] ret_from_fork+0x22/0x30
[ 3.450945] Code: 00 00 41 f6 86 00 01 00 00 02 0f 85 ee 00 0
...
> The filename of the patch is:
> x86-acpi-restore-the-order-of-cpu-ids.patch
> and it can be found in the queue-4.9 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable(a)vger.kernel.org> know about it.
>
>
>>From foo@baz Thu Oct 5 10:28:31 CEST 2017
> From: Dou Liyang <douly.fnst(a)cn.fujitsu.com>
> Date: Fri, 3 Mar 2017 16:02:25 +0800
> Subject: x86/acpi: Restore the order of CPU IDs
>
> From: Dou Liyang <douly.fnst(a)cn.fujitsu.com>
>
>
> [ Upstream commit 2b85b3d22920db7473e5fed5719e7955c0ec323e ]
>
> The following commits:
>
> f7c28833c2 ("x86/acpi: Enable acpi to register all possible cpus at
> boot time") and 8f54969dc8 ("x86/acpi: Introduce persistent storage
> for cpuid <-> apicid mapping")
>
> ... registered all the possible CPUs at boot time via ACPI tables to
> make the mapping of cpuid <-> apicid fixed. Both enabled and disabled
> CPUs could have a logical CPU ID after boot time.
>
> But, ACPI tables are unreliable. the number amd order of Local APIC
> entries which depends on the firmware is often inconsistent with the
> physical devices. Even if they are consistent, The disabled CPUs which
> take up some logical CPU IDs will also make the order discontinuous.
>
> Revert the part of disabled CPUs registration, keep the allocation
> logic of logical CPU IDs and also keep some code location changes.
>
> Signed-off-by: Dou Liyang <douly.fnst(a)cn.fujitsu.com>
> Tested-by: Xiaolong Ye <xiaolong.ye(a)intel.com>
> Cc: rjw(a)rjwysocki.net
> Cc: linux-acpi(a)vger.kernel.org
> Cc: guzheng1(a)huawei.com
> Cc: izumi.taku(a)jp.fujitsu.com
> Cc: lenb(a)kernel.org
> Link: http://lkml.kernel.org/r/1488528147-2279-4-git-send-email-douly.fnst@cn.fuj…
> Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
> Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> ---
> arch/x86/kernel/acpi/boot.c | 7 ++++++-
> arch/x86/kernel/apic/apic.c | 26 +++++++-------------------
> 2 files changed, 13 insertions(+), 20 deletions(-)
>
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -176,10 +176,15 @@ static int acpi_register_lapic(int id, u
> return -EINVAL;
> }
>
> + if (!enabled) {
> + ++disabled_cpus;
> + return -EINVAL;
> + }
> +
> if (boot_cpu_physical_apicid != -1U)
> ver = boot_cpu_apic_version;
>
> - cpu = __generic_processor_info(id, ver, enabled);
> + cpu = generic_processor_info(id, ver);
> if (cpu >= 0)
> early_per_cpu(x86_cpu_to_acpiid, cpu) = acpiid;
>
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -2070,7 +2070,7 @@ static int allocate_logical_cpuid(int ap
> return nr_logical_cpuids++;
> }
>
> -int __generic_processor_info(int apicid, int version, bool enabled)
> +int generic_processor_info(int apicid, int version)
> {
> int cpu, max = nr_cpu_ids;
> bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
> @@ -2128,11 +2128,9 @@ int __generic_processor_info(int apicid,
> if (num_processors >= nr_cpu_ids) {
> int thiscpu = max + disabled_cpus;
>
> - if (enabled) {
> - pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
> - "reached. Processor %d/0x%x ignored.\n",
> - max, thiscpu, apicid);
> - }
> + pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
> + "reached. Processor %d/0x%x ignored.\n",
> + max, thiscpu, apicid);
>
> disabled_cpus++;
> return -EINVAL;
> @@ -2184,23 +2182,13 @@ int __generic_processor_info(int apicid,
> apic->x86_32_early_logical_apicid(cpu);
> #endif
> set_cpu_possible(cpu, true);
> -
> - if (enabled) {
> - num_processors++;
> - physid_set(apicid, phys_cpu_present_map);
> - set_cpu_present(cpu, true);
> - } else {
> - disabled_cpus++;
> - }
> + physid_set(apicid, phys_cpu_present_map);
> + set_cpu_present(cpu, true);
> + num_processors++;
>
> return cpu;
> }
>
> -int generic_processor_info(int apicid, int version)
> -{
> - return __generic_processor_info(apicid, version, true);
> -}
> -
> int hard_smp_processor_id(void)
> {
> return read_apic_id();
>
>
> Patches currently in stable-queue which might be from douly.fnst(a)cn.fujitsu.com are
>
> queue-4.9/x86-acpi-restore-the-order-of-cpu-ids.patch
>
>
>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Greg,
Pleae pull commits for Linux 4.4 .
I've sent a review request for all commits over a week ago and all
comments were addressed.
Thanks,
Sasha
=====
The following changes since commit 08c15ad2e6278a5fe1b209e8fcdbd2d235c48f34:
Linux 4.4.103 (2017-11-30 08:37:28 +0000)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git for-greg/4.14/4.4
for you to fetch changes up to 35875b21e77f03b5e0ce4278579294af69da5d00:
kprobes/x86: Disable preemption in ftrace-based jprobes (2017-11-30 16:49:32 -0500)
- ----------------------------------------------------------------
Aaron Sierra (1):
serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
Alexey Khoroshilov (1):
usb: phy: tahvo: fix error handling in tahvo_usb_probe()
Andy Lutomirski (1):
selftests/x86/ldt_get: Add a few additional tests for limits
Ben Hutchings (1):
usbip: tools: Install all headers needed for libusbip development
Boshi Wang (1):
ima: fix hash algorithm initialization
Christian Borntraeger (1):
s390/pci: do not require AIS facility
Dave Hansen (1):
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
Gustavo A. R. Silva (1):
EDAC, sb_edac: Fix missing break in switch
Hiromitsu Yamasaki (1):
spi: sh-msiof: Fix DMA transfer size check
Jibin Xu (1):
sysrq : fix Show Regs call trace on ARM
John Stultz (2):
usb: dwc2: Fix UDC state tracking
usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode
Lukas Wunner (1):
serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
Masami Hiramatsu (1):
kprobes/x86: Disable preemption in ftrace-based jprobes
Thomas Richter (1):
perf test attr: Fix ignored test case result
arch/s390/include/asm/pci_insn.h | 2 +-
arch/s390/pci/pci.c | 5 +++--
arch/s390/pci/pci_insn.c | 6 +++++-
arch/x86/include/asm/syscalls.h | 2 +-
arch/x86/kernel/kprobes/ftrace.c | 23 ++++++++++++++---------
arch/x86/kernel/ldt.c | 16 +++++++++++++---
arch/x86/um/ldt.c | 7 +++++--
drivers/edac/sb_edac.c | 1 +
drivers/spi/spi-sh-msiof.c | 2 +-
drivers/tty/serial/8250/8250_fintek.c | 2 +-
drivers/tty/serial/8250/8250_port.c | 5 ++++-
drivers/tty/sysrq.c | 9 +++++++--
drivers/usb/dwc2/gadget.c | 7 +++++++
drivers/usb/phy/phy-tahvo.c | 3 ++-
security/integrity/ima/ima_main.c | 4 ++++
tools/perf/tests/attr.c | 2 +-
tools/testing/selftests/x86/ldt_gdt.c | 17 ++++++++++++++++-
tools/usb/usbip/Makefile.am | 3 ++-
18 files changed, 88 insertions(+), 28 deletions(-)
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJaIH/+AAoJEN6mb/eXdyzcQQkP/j3Cdl+nqMgY28ui3xmFG/7N
rmTIjsIjS9lCPHH2i53jR518WPwKwte47k25FzOZi0kwdG2Q7Ds8N0jxJhs/rquU
lrz9T41bO7wihILHTFBOca185Mzf7elXF+VATP+dtVz51JnqvpL1vtZe29Wsv9We
WTuCdjnc9Sv6DP0DbctxQToUCc+SFT/DqOlgdTQfZJmhQAcNrCxmfzKjMJ48W38V
P4FgBdZ7I1pkaNIXWbzDB8XARzesdupFjMjACgTCQ/XdhodgdPwgssNMURX8uKC8
PIpbW8syYQPGmepLv7hiDoFgPKxDPgfSVQXgFIQkfFWXSMnnulI+sj7gi2F8u1fS
MVENj75UTBKL1RgbwFxuIZLRZKDcMi/RRjAdOxiMQWY5v0PWMnCwta1/CtGKnkBT
Wf1do7Lt0ce8sstd+udztNvfQToSBi47LMC/Sdn2GcXTCM1MTUUXiMHeybYLZR1+
Kpsjpj4Fc1CqIrelJUA78KpDpCpUb5osj8tnahx4pYmBp11V3G6jGQZYLPZDUxdU
0vpzAaeeVIRg2X17VB4zuDdLzVMrB0ChImRcXIDht7wuyMG2+vqKX7IB+Mit7yEQ
md6Benpeok44SSxlXKRrVz37ZlStxGSVIG+F1DTR4dE17N/4ZUNpKx/eXP8pFtlh
QVkzov+tpzlMNXSB1cg6
=BCzy
-----END PGP SIGNATURE-----