From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Paul Burton <paul.burton@mips.com>,
Matt Redfearn <matt.redfearn@mips.com>,
James Hogan <jhogan@kernel.org>,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org
Subject: [PATCH 4.9 66/87] MIPS: Fix CM region target definitions
Date: Mon, 13 Nov 2017 13:56:23 +0100 [thread overview]
Message-ID: <20171113125621.313640034@linuxfoundation.org> (raw)
In-Reply-To: <20171113125615.304035578@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Burton <paul.burton@mips.com>
commit 6a6cba1d945a7511cdfaf338526871195e420762 upstream.
The default CM target field in the GCR_BASE register is encoded with 0
meaning memory & 1 being reserved. However the definitions we use for
those bits effectively get these two values backwards - likely because
they were copied from the definitions for the CM regions where the
target is encoded differently. This results in use setting up GCR_BASE
with the reserved target value by default, rather than targeting memory
as intended. Although we currently seem to get away with this it's not a
great idea to rely upon.
Fix this by changing our macros to match the documentated target values.
The incorrect encoding became used as of commit 9f98f3dd0c51 ("MIPS: Add
generic CM probe & access code") in the Linux v3.15 cycle, and was
likely carried forwards from older but unused code introduced by
commit 39b8d5254246 ("[MIPS] Add support for MIPS CMP platform.") in the
v2.6.26 cycle.
Fixes: 9f98f3dd0c51 ("MIPS: Add generic CM probe & access code")
Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Matt Redfearn <matt.redfearn@mips.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # v3.15+
Patchwork: https://patchwork.linux-mips.org/patch/17562/
Signed-off-by: James Hogan <jhogan@kernel.org>
[jhogan@kernel.org: Backported 3.15..4.13]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/include/asm/mips-cm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -239,8 +239,8 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80)
#define CM_GCR_BASE_GCRBASE_MSK (_ULCAST_(0x1ffff) << 15)
#define CM_GCR_BASE_CMDEFTGT_SHF 0
#define CM_GCR_BASE_CMDEFTGT_MSK (_ULCAST_(0x3) << 0)
-#define CM_GCR_BASE_CMDEFTGT_DISABLED 0
-#define CM_GCR_BASE_CMDEFTGT_MEM 1
+#define CM_GCR_BASE_CMDEFTGT_MEM 0
+#define CM_GCR_BASE_CMDEFTGT_RESERVED 1
#define CM_GCR_BASE_CMDEFTGT_IOCU0 2
#define CM_GCR_BASE_CMDEFTGT_IOCU1 3
next prev parent reply other threads:[~2017-11-13 12:56 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
2017-11-16 4:09 ` Patrick Brünn
2017-11-16 13:35 ` Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 29/87] libertas: fix improper return value Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 39/87] Input: mpr121 - set missing event capability Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 59/87] crypto: x86/sha256-mb " Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
2017-11-13 12:56 ` Greg Kroah-Hartman [this message]
2017-11-13 12:56 ` [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
2017-11-14 15:54 ` Pablo Neira Ayuso
2017-11-14 15:55 ` Pablo Neira Ayuso
2017-11-13 12:56 ` [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
2017-11-13 21:51 ` [PATCH 4.9 00/87] 4.9.62-stable review Shuah Khan
2017-11-13 22:28 ` Guenter Roeck
2017-11-14 6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
2017-11-14 7:41 ` Greg Kroah-Hartman
2017-11-14 7:46 ` Sebastian Gottschall
2017-11-14 8:01 ` Greg Kroah-Hartman
2017-11-14 22:20 ` [PATCH 4.9 00/87] 4.9.62-stable review Tom Gall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113125621.313640034@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=matt.redfearn@mips.com \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).