Merge tag 'mips_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jan 2024 19:20:50 +0000 (11:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jan 2024 19:20:50 +0000 (11:20 -0800)
Pull MIPS updates from Thomas Bogendoerfer:
 "Just cleanups and fixes"

* tag 'mips_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
  MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
  MIPS: Fix typos
  MIPS: Remove unused shadow GPR support from vector irq setup
  MIPS: Allow vectored interrupt handler to reside everywhere for 64bit
  mips: Set dump-stack arch description
  mips: mm: add slab availability checking in ioremap_prot
  mips: Optimize max_mapnr init procedure
  mips: Fix max_mapnr being uninitialized on early stages
  mips: Fix incorrect max_low_pfn adjustment
  mips: dmi: Fix early remap on MIPS32
  MIPS: compressed: Use correct instruction for 64 bit code
  MIPS: SGI-IP27: hubio: fix nasid kernel-doc warning
  MAINTAINERS: Add myself as maintainer of the Ralink architecture

75 files changed:
MAINTAINERS
arch/mips/alchemy/devboards/db1200.c
arch/mips/alchemy/devboards/db1550.c
arch/mips/bcm47xx/buttons.c
arch/mips/bcm63xx/clk.c
arch/mips/boot/compressed/dbg.c
arch/mips/boot/compressed/head.S
arch/mips/boot/elf2ecoff.c
arch/mips/cavium-octeon/csrc-octeon.c
arch/mips/cavium-octeon/executive/cvmx-boot-vector.c
arch/mips/cavium-octeon/executive/cvmx-bootmem.c
arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
arch/mips/cavium-octeon/executive/cvmx-helper-jtag.c
arch/mips/cavium-octeon/executive/cvmx-pko.c
arch/mips/cavium-octeon/octeon-platform.c
arch/mips/fw/arc/promlib.c
arch/mips/include/asm/debug.h
arch/mips/include/asm/dmi.h
arch/mips/include/asm/io.h
arch/mips/include/asm/mach-au1x00/au1000_dma.h
arch/mips/include/asm/mach-au1x00/gpio-au1000.h
arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h
arch/mips/include/asm/mach-loongson64/loongson_hwmon.h
arch/mips/include/asm/mach-loongson64/loongson_regs.h
arch/mips/include/asm/mach-malta/spaces.h
arch/mips/include/asm/mips-boards/bonito64.h
arch/mips/include/asm/mips-cpc.h
arch/mips/include/asm/mipsregs.h
arch/mips/include/asm/octeon/cvmx-bootinfo.h
arch/mips/include/asm/octeon/cvmx-cmd-queue.h
arch/mips/include/asm/octeon/cvmx-pko.h
arch/mips/include/asm/octeon/cvmx-pow.h
arch/mips/include/asm/octeon/octeon-model.h
arch/mips/include/asm/page.h
arch/mips/include/asm/pci.h
arch/mips/include/asm/pgtable-bits.h
arch/mips/include/asm/sgi/mc.h
arch/mips/include/asm/sn/klconfig.h
arch/mips/include/asm/sync.h
arch/mips/include/asm/thread_info.h
arch/mips/include/asm/timex.h
arch/mips/include/asm/vdso/vdso.h
arch/mips/include/uapi/asm/mman.h
arch/mips/include/uapi/asm/msgbuf.h
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/genex.S
arch/mips/kernel/kprobes.c
arch/mips/kernel/prom.c
arch/mips/kernel/relocate.c
arch/mips/kernel/relocate_kernel.S
arch/mips/kernel/setup.c
arch/mips/kernel/signal.c
arch/mips/kernel/traps.c
arch/mips/kernel/vpe.c
arch/mips/kvm/emulate.c
arch/mips/loongson2ef/common/platform.c
arch/mips/loongson64/smp.c
arch/mips/mm/c-r4k.c
arch/mips/mm/cex-gen.S
arch/mips/mm/init.c
arch/mips/mm/ioremap.c
arch/mips/mm/tlb-r3k.c
arch/mips/mm/tlb-r4k.c
arch/mips/mm/tlbex.c
arch/mips/net/bpf_jit_comp32.c
arch/mips/pci/ops-loongson2.c
arch/mips/pci/pci-alchemy.c
arch/mips/pci/pci-ar2315.c
arch/mips/pci/pci-lantiq.c
arch/mips/pci/pci-octeon.c
arch/mips/pci/pci-xtalk-bridge.c
arch/mips/pci/pcie-octeon.c
arch/mips/ralink/mt7621.c
arch/mips/sgi-ip27/ip27-hubio.c
arch/mips/txx9/generic/pci.c

index 2cd538369f3cfd91ffd01b3748c634796eab5d7a..f1a3497efb482c526e86eb0639184f41c2542745 100644 (file)
@@ -18196,6 +18196,7 @@ F:      drivers/media/cec/usb/rainshadow/
 
 RALINK MIPS ARCHITECTURE
 M:     John Crispin <john@phrozen.org>
+M:     Sergio Paracuellos <sergio.paracuellos@gmail.com>
 L:     linux-mips@vger.kernel.org
 S:     Maintained
 F:     arch/mips/ralink
index f521874ebb07b22495b01972ca92828491311779..67f067706af27342317c4265d2b3dda97681d391 100644 (file)
@@ -847,7 +847,7 @@ int __init db1200_dev_setup(void)
        i2c_register_board_info(0, db1200_i2c_devs,
                                ARRAY_SIZE(db1200_i2c_devs));
        spi_register_board_info(db1200_spi_devs,
-                               ARRAY_SIZE(db1200_i2c_devs));
+                               ARRAY_SIZE(db1200_spi_devs));
 
        /* SWITCHES:    S6.8 I2C/SPI selector  (OFF=I2C  ON=SPI)
         *              S6.7 AC97/I2S selector (OFF=AC97 ON=I2S)
index fd91d9c9a2525ddd7efa870eff23da64f3b3e3df..6c6837181f5555f3f9b8ebf495c03a22bef735b4 100644 (file)
@@ -589,7 +589,7 @@ int __init db1550_dev_setup(void)
        i2c_register_board_info(0, db1550_i2c_devs,
                                ARRAY_SIZE(db1550_i2c_devs));
        spi_register_board_info(db1550_spi_devs,
-                               ARRAY_SIZE(db1550_i2c_devs));
+                               ARRAY_SIZE(db1550_spi_devs));
 
        c = clk_get(NULL, "psc0_intclk");
        if (!IS_ERR(c)) {
index 437a737c01dd05727b716dc4a913357a94511c00..46994f9bb8219cc23aa660a3cd387780d842e0ee 100644 (file)
@@ -147,21 +147,21 @@ static const struct gpio_keys_button
 bcm47xx_buttons_buffalo_whr_g125[] __initconst = {
        BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
        BCM47XX_GPIO_KEY(4, KEY_RESTART),
-       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode swtich */
+       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode switch */
 };
 
 static const struct gpio_keys_button
 bcm47xx_buttons_buffalo_whr_g54s[] __initconst = {
        BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
        BCM47XX_GPIO_KEY_H(4, KEY_RESTART),
-       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode swtich */
+       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode switch */
 };
 
 static const struct gpio_keys_button
 bcm47xx_buttons_buffalo_whr_hp_g54[] __initconst = {
        BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
        BCM47XX_GPIO_KEY(4, KEY_RESTART),
-       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode swtich */
+       BCM47XX_GPIO_KEY(5, BTN_0), /* Router / AP mode switch */
 };
 
 static const struct gpio_keys_button
index 86a6e25908664b59dafae3ca2297f70e296220c9..3144965fb7dc4fa78693201f614e7b883590ba75 100644 (file)
@@ -174,7 +174,7 @@ static void enetsw_set(struct clk *clk, int enable)
        }
 
        if (enable) {
-               /* reset switch core afer clock change */
+               /* reset switch core after clock change */
                bcm63xx_core_set_reset(BCM63XX_RESET_ENETSW, 1);
                msleep(10);
                bcm63xx_core_set_reset(BCM63XX_RESET_ENETSW, 0);
@@ -304,7 +304,7 @@ static void xtm_set(struct clk *clk, int enable)
        bcm_hwclock_set(CKCTL_6368_SAR_EN, enable);
 
        if (enable) {
-               /* reset sar core afer clock change */
+               /* reset sar core after clock change */
                bcm63xx_core_set_reset(BCM63XX_RESET_SAR, 1);
                mdelay(1);
                bcm63xx_core_set_reset(BCM63XX_RESET_SAR, 0);
index 2f1ac38fe1ccac751d1be526660981507a34aebb..95405292accdff5e4211cd8ac4cababf2788d028 100644 (file)
@@ -3,7 +3,7 @@
  * MIPS-specific debug support for pre-boot environment
  *
  * NOTE: putc() is board specific, if your board have a 16550 compatible uart,
- * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you
+ * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. otherwise, you
  * need to implement your own putc().
  */
 #include <linux/compiler.h>
index 5795d0af1e1b2e9518bc4cbab56a4773c95ba78b..d237a834b85ee5c6a880d61368eae83467efd7e2 100644 (file)
@@ -25,8 +25,8 @@
        /* Clear BSS */
        PTR_LA  a0, _edata
        PTR_LA  a2, _end
-1:     sw      zero, 0(a0)
-       addiu   a0, a0, 4
+1:     PTR_S   zero, 0(a0)
+       PTR_ADDIU a0, a0, PTRSIZE
        bne     a2, a0, 1b
 
        PTR_LA  a0, (.heap)          /* heap address */
index 6972b97235daf4a97a57205180ed5b63ebf98409..549c5d6ef6d7c7443634acbdc2a6d8e9c3139aa1 100644 (file)
@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
        efh.f_symptr = 0;
        efh.f_nsyms = 0;
        efh.f_opthdr = sizeof eah;
-       efh.f_flags = 0x100f;   /* Stripped, not sharable. */
+       efh.f_flags = 0x100f;   /* Stripped, not shareable. */
 
        memset(esecs, 0, sizeof esecs);
        strcpy(esecs[0].s_name, ".text");
index 124817609ce0136c4742dd2cf5674b6d26bbb7f1..af62a210a40b9147047fd8b46204550e79fa1ab0 100644 (file)
@@ -113,7 +113,7 @@ static struct clocksource clocksource_mips = {
 
 unsigned long long notrace sched_clock(void)
 {
-       /* 64-bit arithmatic can overflow, so use 128-bit.  */
+       /* 64-bit arithmetic can overflow, so use 128-bit.  */
        u64 t1, t2, t3;
        unsigned long long rv;
        u64 mult = clocksource_mips.mult;
index b7019d21808e04719e9913270dbab0c90438eadb..76446db66defdc9780ef9526b095aec7979a5a2a 100644 (file)
@@ -143,7 +143,7 @@ static void cvmx_boot_vector_init(void *mem)
                uint64_t v = _cvmx_bootvector_data[i];
 
                if (OCTEON_IS_OCTEON1PLUS() && (i == 0 || i == 7))
-                       v &= 0xffffffff00000000ull; /* KScratch not availble. */
+                       v &= 0xffffffff00000000ull; /* KScratch not available */
                cvmx_write_csr(CVMX_MIO_BOOT_LOC_ADR, i * 8);
                cvmx_write_csr(CVMX_MIO_BOOT_LOC_DAT, v);
        }
index 334bf8e577e50170acc021d8e160d829891e91b6..628ebdf4b9c55df52c08a70c352649cc0e7a4ff4 100644 (file)
@@ -264,7 +264,7 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t address_min,
         * Convert !0 address_min and 0 address_max to special case of
         * range that specifies an exact memory block to allocate.  Do
         * this before other checks and adjustments so that this
-        * tranformation will be validated.
+        * transformation will be validated.
         */
        if (address_min && !address_max)
                address_max = address_min + req_size;
index aa7bbf8d0df558c74f4bb438a18985ff7c30c37c..042a6bc44b5c25ae7c15b748f52c5a3935297eae 100644 (file)
@@ -192,7 +192,7 @@ cvmx_cmd_queue_result_t cvmx_cmd_queue_initialize(cvmx_cmd_queue_id_t queue_id,
 }
 
 /*
- * Shutdown a queue a free it's command buffers to the FPA. The
+ * Shutdown a queue and free its command buffers to the FPA. The
  * hardware connected to the queue must be stopped before this
  * function is called.
  *
@@ -285,7 +285,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id)
 
 /*
  * Return the command buffer to be written to. The purpose of this
- * function is to allow CVMX routine access t othe low level buffer
+ * function is to allow CVMX routine access tthe low level buffer
  * for initial hardware setup. User applications should not call this
  * function directly.
  *
index 607b4e65957977adcd03a467f07bbfa312c5be9d..1fceb7fd2c944cdc151f5b40a0c114deb1639e7d 100644 (file)
@@ -103,7 +103,7 @@ uint32_t cvmx_helper_qlm_jtag_shift(int qlm, int bits, uint32_t data)
 /**
  * Shift long sequences of zeros into the QLM JTAG chain. It is
  * common to need to shift more than 32 bits of zeros into the
- * chain. This function is a convience wrapper around
+ * chain. This function is a convenience wrapper around
  * cvmx_helper_qlm_jtag_shift() to shift more than 32 bits of
  * zeros at a time.
  *
index 15faca494c80720c120569463b4da3ade29e3c9f..6e70b859a0ac6c6db6eb13e63597a41b7e69ffcc 100644 (file)
@@ -615,7 +615,7 @@ int cvmx_pko_rate_limit_bits(int port, uint64_t bits_s, int burst)
        /*
         * Each packet has a 12 bytes of interframe gap, an 8 byte
         * preamble, and a 4 byte CRC. These are not included in the
-        * per word count. Multiply by 8 to covert to bits and divide
+        * per word count. Multiply by 8 to convert to bits and divide
         * by 256 for limit granularity.
         */
        pko_mem_port_rate0.s.rate_pkt = (12 + 8 + 4) * 8 * tokens_per_bit / 256;
index f76783c24338b9a236eb3a3cea172c491ef51139..5e1dd4e6e82fb8e1438014403aeba8159ae0d468 100644 (file)
@@ -973,7 +973,7 @@ int __init octeon_prune_device_tree(void)
                         * zero.
                         */
 
-                       /* Asume that CS1 immediately follows. */
+                       /* Assume that CS1 immediately follows. */
                        mio_boot_reg_cfg.u64 =
                                cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(cs + 1));
                        region1_base = mio_boot_reg_cfg.s.base << 16;
index 5e9e840a93144cf7700c5f7b39fb6b66e9bb3794..93e1e70393eeb9a933835ac8ac72f5388d66950c 100644 (file)
 /*
  * For 64bit kernels working with a 32bit ARC PROM pointer arguments
  * for ARC calls need to reside in CKEG0/1. But as soon as the kernel
- * switches to it's first kernel thread stack is set to an address in
+ * switches to its first kernel thread stack is set to an address in
  * XKPHYS, so anything on stack can't be used anymore. This is solved
- * by using a * static declartion variables are put into BSS, which is
+ * by using a * static declaration variables are put into BSS, which is
  * linked to a CKSEG0 address. Since this is only used on UP platforms
- * there is not spinlock needed
+ * there is no spinlock needed
  */
 #define O32_STATIC     static
 #else
index c7013e1cb53fb780a054d2423425f032c3f9159e..e70392429246e12c1a1af79025885bf487e2d2b0 100644 (file)
@@ -10,7 +10,7 @@
 
 /*
  * mips_debugfs_dir corresponds to the "mips" directory at the top level
- * of the DebugFS hierarchy. MIPS-specific DebugFS entires should be
+ * of the DebugFS hierarchy. MIPS-specific DebugFS entries should be
  * placed beneath this directory.
  */
 extern struct dentry *mips_debugfs_dir;
index 27415a288adf56743f370e5017762d06ce3f5e5a..dc397f630c6608c85ba5224686e3470e5d5dc82e 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/io.h>
 #include <linux/memblock.h>
 
-#define dmi_early_remap(x, l)          ioremap_cache(x, l)
+#define dmi_early_remap(x, l)          ioremap(x, l)
 #define dmi_early_unmap(x, l)          iounmap(x)
 #define dmi_remap(x, l)                        ioremap_cache(x, l)
 #define dmi_unmap(x)                   iounmap(x)
index 85bbd967e05fa3ad2001fe1624d41304d951d745..af58d6ae06b85ea1f36ecc1cc676f9352d4a3ed1 100644 (file)
@@ -159,7 +159,7 @@ void iounmap(const volatile void __iomem *addr);
  * address is not guaranteed to be usable directly as a virtual
  * address.
  *
- * This version of ioremap ensures that the memory is marked cachable by
+ * This version of ioremap ensures that the memory is marked cacheable by
  * the CPU.  Also enables full write-combining.         Useful for some
  * memory-like regions on I/O busses.
  */
@@ -177,7 +177,7 @@ void iounmap(const volatile void __iomem *addr);
  * address is not guaranteed to be usable directly as a virtual
  * address.
  *
- * This version of ioremap ensures that the memory is marked uncachable
+ * This version of ioremap ensures that the memory is marked uncacheable
  * but accelerated by means of write-combining feature. It is specifically
  * useful for PCIe prefetchable windows, which may vastly improve a
  * communications performance. If it was determined on boot stage, what
index 0a0cd4270c6f26966ffdfaa781a24c8f759728db..b82e513c8523a42c4c7b126dcc2718d453b97639 100644 (file)
@@ -259,7 +259,7 @@ static inline void set_dma_mode(unsigned int dmanr, unsigned int mode)
        if (!chan)
                return;
        /*
-        * set_dma_mode is only allowed to change endianess, direction,
+        * set_dma_mode is only allowed to change endianness, direction,
         * transfer size, device FIFO width, and coherency settings.
         * Make sure anything else is masked off.
         */
index 82bc2766e2ec1386f3fa2492670650795e902d8a..d820b481ac564198096328176cbb103993392994 100644 (file)
@@ -435,7 +435,7 @@ static inline void alchemy_gpio2_disable_int(int gpio2)
 /**
  * alchemy_gpio2_enable -  Activate GPIO2 block.
  *
- * The GPIO2 block must be enabled excplicitly to work.         On systems
+ * The GPIO2 block must be enabled explicitly to work.  On systems
  * where this isn't done by the bootloader, this macro can be used.
  */
 static inline void alchemy_gpio2_enable(void)
index 5855ba1bd1ecf323ed621f2bd8917f7cceeed428..40eaa72e54d070a42b88a9e5c1cf9ebceefd5219 100644 (file)
@@ -55,7 +55,7 @@ extern __iomem void *ltq_sys1_membase;
 #define ltq_sys1_w32_mask(clear, set, reg)   \
        ltq_sys1_w32((ltq_sys1_r32(reg) & ~(clear)) | (set), reg)
 
-/* allow the gpio and pinctrl drivers to talk to eachother */
+/* allow the gpio and pinctrl drivers to talk to each other */
 extern int pinctrl_falcon_get_range_size(int id);
 extern void pinctrl_falcon_add_gpio_range(struct pinctrl_gpio_range *range);
 
index 545f91f2ae16ac9840464b45bccb5bdbf684633e..721eafc4644e509e6f43db746fbb00ed83a18699 100644 (file)
@@ -42,7 +42,7 @@ struct loongson_fan_policy {
        /* period between two check. (Unit: S) */
        u8      adjust_period;
 
-       /* fan adjust usually depend on a temprature input */
+       /* fan adjust usually depend on a temperature input */
        get_temp_fun    depend_temp;
 
        /* up_step/down_step used when type is STEP_SPEED_POLICY */
index b5be7511f6cde72135899d2e17f43f5ec5a779c1..fec767507604923ffc34358b0fdf3170a68f94b0 100644 (file)
@@ -227,7 +227,7 @@ static inline void csr_writeq(u64 val, u32 reg)
 #define LOONGSON_CSR_NODECNT   0x408
 #define LOONGSON_CSR_CPUTEMP   0x428
 
-/* PerCore CSR, only accessable by local cores */
+/* PerCore CSR, only accessible by local cores */
 #define LOONGSON_CSR_IPI_STATUS        0x1000
 #define LOONGSON_CSR_IPI_EN    0x1004
 #define LOONGSON_CSR_IPI_SET   0x1008
index d7e54971ec668bb86be18447ffccaeb0ae66343b..1ce4ba97852f7c54b9408385758f372464092e17 100644 (file)
  * The kernel is still located in 0x80000000(kseg0). However,
  * the physical mask has been shifted to 0x80000000 which exploits the alias
  * on the Malta board. As a result of which, we override the __pa_symbol
- * to peform direct mapping from virtual to physical addresses. In other
+ * to perform direct mapping from virtual to physical addresses. In other
  * words, the 0x80000000 virtual address maps to 0x80000000 physical address
  * which in turn aliases to 0x0. We do this in order to be able to use a flat
  * 2GB of memory (0x80000000 - 0xffffffff) so we can avoid the I/O hole in
  * 0x10000000 - 0x1fffffff.
  * The last 64KB of physical memory are reserved for correct HIGHMEM
- * macros arithmetics.
+ * macros arithmetic.
  *
  */
 
index 5368891d424b7724fff66f477f5bcd52db4be538..31a31fe78d7759edaa0e437f52694ea9be964c52 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /* Revision 1.48 autogenerated on 08/17/99 15:20:01 */
-/* This bonito64 version editted from bonito.h Revision 1.48 on 11/09/00 */
+/* This bonito64 version edited from bonito.h Revision 1.48 on 11/09/00 */
 
 #ifndef _ASM_MIPS_BOARDS_BONITO64_H
 #define _ASM_MIPS_BOARDS_BONITO64_H
index b54453f1648c1fb34e35beabaa2c6e7e00884423..5f3a7a9f42bf0d4b038343fe98451a9b5b0bf116 100644 (file)
@@ -22,7 +22,7 @@ extern void __iomem *mips_cpc_base;
  *                              the CPC
  *
  * Returns the default physical base address of the Cluster Power Controller
- * memory mapped registers. This is platform dependant & must therefore be
+ * memory mapped registers. This is platform dependent & must therefore be
  * implemented per-platform.
  */
 extern phys_addr_t mips_cpc_default_phys_base(void);
index 2d53704d9f2461e1dadfc93a16b96904c821f5c2..ec58cb76d076d54234d189b0cec4f26643a670ac 100644 (file)
@@ -98,7 +98,7 @@
 
 /*
  * R4640/R4650 cp0 register names.  These registers are listed
- * here only for completeness; without MMU these CPUs are not useable
+ * here only for completeness; without MMU these CPUs are not usable
  * by Linux.  A future ELKS port might take make Linux run on them
  * though ...
  */
 #define EXCCODE_THREAD         25      /* Thread exceptions (MT) */
 #define EXCCODE_DSPDIS         26      /* DSP disabled exception */
 #define EXCCODE_GE             27      /* Virtualized guest exception (VZ) */
-#define EXCCODE_CACHEERR       30      /* Parity/ECC occured on a core */
+#define EXCCODE_CACHEERR       30      /* Parity/ECC occurred on a core */
 
 /* Implementation specific trap codes used by MIPS cores */
 #define MIPS_EXCCODE_TLBPAR    16      /* TLB parity error exception */
index c1c0b3230e0a9cbd27393ea6cc307f9a11843abd..028bf1d6daeeb688aac4589029473ad393424d23 100644 (file)
@@ -114,7 +114,7 @@ struct cvmx_bootinfo {
 
        /*
         * flags indicating various configuration options.  These
-        * flags supercede the 'flags' variable and should be used
+        * flags supersede the 'flags' variable and should be used
         * instead if available.
         */
        uint32_t config_flags;
index a07a36f7d8141cf8d9946f57ec8bebfea080bafa..67e1b2162b194536af2924494c9f52e8422bec72 100644 (file)
@@ -145,7 +145,7 @@ typedef struct {
 /**
  * This structure contains the global state of all command queues.
  * It is stored in a bootmem named block and shared by all
- * applications running on Octeon. Tickets are stored in a differnet
+ * applications running on Octeon. Tickets are stored in a different
  * cache line that queue information to reduce the contention on the
  * ll/sc used to get a ticket. If this is not the case, the update
  * of queue state causes the ll/sc to fail quite often.
@@ -172,7 +172,7 @@ cvmx_cmd_queue_result_t cvmx_cmd_queue_initialize(cvmx_cmd_queue_id_t queue_id,
                                                  int pool_size);
 
 /**
- * Shutdown a queue a free it's command buffers to the FPA. The
+ * Shutdown a queue and free its command buffers to the FPA. The
  * hardware connected to the queue must be stopped before this
  * function is called.
  *
@@ -194,7 +194,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id);
 
 /**
  * Return the command buffer to be written to. The purpose of this
- * function is to allow CVMX routine access t othe low level buffer
+ * function is to allow CVMX routine access tthe low level buffer
  * for initial hardware setup. User applications should not call this
  * function directly.
  *
index 5fec8476e421238cef239cc4cea53fe5a13705f9..f18a7f24daf8249379e76202f3fc19a2f6e82061 100644 (file)
@@ -91,7 +91,7 @@ typedef enum {
 } cvmx_pko_status_t;
 
 /**
- * This enumeration represents the differnet locking modes supported by PKO.
+ * This enumeration represents the different locking modes supported by PKO.
  */
 typedef enum {
        /*
index a3b23811e0c3048d8862e56ea3625136cd17479f..21b4378244fafb1e84be59b00a96c7d2feb808f1 100644 (file)
@@ -1342,7 +1342,7 @@ static inline void cvmx_pow_tag_sw_wait(void)
  * This function does NOT wait for previous tag switches to complete,
  * so the caller must ensure that there is not a pending tag switch.
  *
- * @wait:   When set, call stalls until work becomes avaiable, or times out.
+ * @wait:   When set, call stalls until work becomes available, or times out.
  *              If not set, returns immediately.
  *
  * Returns: the WQE pointer from POW. Returns NULL if no work
@@ -1376,7 +1376,7 @@ static inline struct cvmx_wqe *cvmx_pow_work_request_sync_nocheck(cvmx_pow_wait_
  * This function waits for any previous tag switch to complete before
  * requesting the new work.
  *
- * @wait:   When set, call stalls until work becomes avaiable, or times out.
+ * @wait:   When set, call stalls until work becomes available, or times out.
  *              If not set, returns immediately.
  *
  * Returns: the WQE pointer from POW. Returns NULL if no work
index 6c68517c2770274c966a5b0680de1ebd2e1a1378..e53b61a8e32f1790f4be2e44293b17756fe4039a 100644 (file)
@@ -54,7 +54,7 @@
 #define OM_CHECK_SUBMODEL        0x02000000
 /* Match all models previous than the one specified */
 #define OM_MATCH_PREVIOUS_MODELS  0x04000000
-/* Ignores the minor revison on newer parts */
+/* Ignores the minor revision on newer parts */
 #define OM_IGNORE_MINOR_REVISION  0x08000000
 #define OM_FLAG_MASK             0xff000000
 
 #define OCTEON_CN52XX_PASS2    OCTEON_CN52XX_PASS2_X
 
 /*
- * CN3XXX models with old revision enconding
+ * CN3XXX models with old revision encoding
  */
 #define OCTEON_CN38XX_PASS1    0x000d0000
 #define OCTEON_CN38XX_PASS2    0x000d0001
index 5978a8dfb917b0ec39b8c472794057d256047679..ef9585d96f6b08f2ba6d0edcb5031acdb6ca573d 100644 (file)
@@ -173,7 +173,7 @@ static inline unsigned long ___pa(unsigned long x)
        if (IS_ENABLED(CONFIG_64BIT)) {
                /*
                 * For MIPS64 the virtual address may either be in one of
-                * the compatibility segements ckseg0 or ckseg1, or it may
+                * the compatibility segments ckseg0 or ckseg1, or it may
                 * be in xkphys.
                 */
                return x < CKSEG0 ? XPHYSADDR(x) : CPHYSADDR(x);
index 3fd6e22c108b415ecceac2f253faa29e32b9fb99..d993df6302dcf432e1c989efa334c1f392616c79 100644 (file)
@@ -23,7 +23,7 @@
 #ifdef CONFIG_PCI_DRIVERS_LEGACY
 
 /*
- * Each pci channel is a top-level PCI bus seem by CPU.         A machine  with
+ * Each PCI channel is a top-level PCI bus seem by CPU.         A machine with
  * multiple PCI channels may have multiple PCI host controllers or a
  * single controller supporting multiple channels.
  */
index 421e78c30253cbadd43aeb892ebdb4cf83ef0470..088623ba7b8b177e61020c962c27e9b293d7e3a5 100644 (file)
@@ -201,7 +201,7 @@ enum pgtable_bits {
  * The final layouts of the PTE bits are:
  *
  *   64-bit, R1 or earlier:     CCC D V G [S H] M A W R P
- *   32-bit, R1 or earler:      CCC D V G M A W R P
+ *   32-bit, R1 or earlier:     CCC D V G M A W R P
  *   64-bit, R2 or later:       CCC D V G RI/R XI [S H] M A W P
  *   32-bit, R2 or later:       CCC D V G RI/R XI M A W P
  */
index 3a070cec97e7d7be66f21cdb6a1b43c437ed632b..5e96f9d3262497e60e221bc2a8e58d2d23907d9d 100644 (file)
@@ -96,7 +96,7 @@ struct sgimc_regs {
        volatile u32 lbursttp;  /* Time period for long bursts */
 
        /* MC chip can drive up to 4 bank 4 SIMMs each. All SIMMs in bank must
-        * be the same size. The size encoding for supported SIMMs is bellow */
+        * be the same size. The size encoding for supported SIMMs is below */
        u32 _unused11[9];
        volatile u32 mconfig0;  /* Memory config register zero */
        u32 _unused12;
index 117f85e4bef59a7b315d497fa56aecf594eeba7a..3d1670b3e05273423ad0fef59d4a67d671ad53c6 100644 (file)
@@ -851,7 +851,7 @@ typedef union kldev_s {          /* for device structure allocation */
 /*
  * TBD - Allocation issues.
  *
- * Do we need to Mark off sepatate heaps for lboard_t, rboard_t, component,
+ * Do we need to Mark off separate heaps for lboard_t, rboard_t, component,
  * errinfo and allocate from them, or have a single heap and allocate all
  * structures from it. Debug is easier in the former method since we can
  * dump all similar structs in one command, but there will be lots of holes,
index aabd097933fe97f599361dd002d6e9f2fcdd999b..44c04a82d0b7d4ef0a983ce97dbbae9fbe8db271 100644 (file)
@@ -19,7 +19,7 @@
  *
  * Ordering barriers can be more efficient than completion barriers, since:
  *
- *   a) Ordering barriers only require memory access instructions which preceed
+ *   a) Ordering barriers only require memory access instructions which precede
  *      them in program order (older instructions) to reach a point in the
  *      load/store datapath beyond which reordering is not possible before
  *      allowing memory access instructions which follow them (younger
index ecae7470faa4058403b259c9ea199267684e30db..b9d76e8ac5a23d553c2a1285a88eeeb142c09762 100644 (file)
@@ -27,7 +27,7 @@ struct thread_info {
        unsigned long           flags;          /* low level flags */
        unsigned long           tp_value;       /* thread pointer */
        __u32                   cpu;            /* current CPU */
-       int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
+       int                     preempt_count;  /* 0 => preemptible, <0 => BUG */
        struct pt_regs          *regs;
        long                    syscall;        /* syscall number */
 };
index 2e107886f97ac73d38c6ad70c5fb56e7d2a9cd73..7ef06dcdc46ec5d6edcd0647038403b24419df4a 100644 (file)
@@ -46,7 +46,7 @@ typedef unsigned int cycles_t;
  *
  * There is a suggested workaround and also the erratum can't strike if
  * the compare interrupt isn't being used as the clock source device.
- * However for now the implementaton of this function doesn't get these
+ * However for now the implementation of this function doesn't get these
  * fine details right.
  */
 static inline int can_use_mips_counter(unsigned int prid)
index a327ca21270eccfa5ace49ca33f502242dd825e1..6cd88191fefa9ce6d8323dd70d45aa9a198ac9d0 100644 (file)
@@ -32,7 +32,7 @@ static inline unsigned long get_vdso_base(void)
 #else
        /*
         * Get the base load address of the VDSO. We have to avoid generating
-        * relocations and references to the GOT because ld.so does not peform
+        * relocations and references to the GOT because ld.so does not perform
         * relocations on the VDSO. We use the current offset from the VDSO base
         * and perform a PC-relative branch which gives the absolute address in
         * ra, and take the difference. The assembler chokes on
index c6e1fc77c9968874feefc79b7c94a165d0ad89d2..9c48d9a21aa01ff16019d25249f4bcb97120ce08 100644 (file)
@@ -88,7 +88,7 @@
 #define MADV_HUGEPAGE  14              /* Worth backing with hugepages */
 #define MADV_NOHUGEPAGE 15             /* Not worth backing with hugepages */
 
-#define MADV_DONTDUMP  16              /* Explicity exclude from the core dump,
+#define MADV_DONTDUMP  16              /* Explicitly exclude from core dump,
                                           overrides the coredump filter bits */
 #define MADV_DODUMP    17              /* Clear the MADV_NODUMP flag */
 
index 128af72f2dfead88156e27b8dde059613820dda5..d546642fc67e6702620a2e535d155c21314b3909 100644 (file)
@@ -62,7 +62,7 @@ struct msqid64_ds {
        unsigned long  __unused5;
 };
 #else
-#warning no endianess set
+#warning no endianness set
 #endif
 
 #endif /* _ASM_MSGBUF_H */
index de7460c3a72e914b573e7b2680dbd9d56866f58f..bda7f193baab9f6709e43212fbc2960a0eae1cc0 100644 (file)
@@ -1138,7 +1138,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
                 * This processor doesn't have an MMU, so it's not
                 * "real easy" to run Linux on it. It is left purely
                 * for documentation.  Commented out because it shares
-                * it's c0_prid id number with the TX3900.
+                * its c0_prid id number with the TX3900.
                 */
                c->cputype = CPU_R4650;
                __cpu_name[cpu] = "R4650";
index b6de8e88c1bd428f1f1b7eee6b1118c9304e3601..a572ce36a24f21d25bf99943deac10545f7c3de5 100644 (file)
@@ -272,18 +272,17 @@ NESTED(except_vec_vi, 0, sp)
        .set    push
        .set    noreorder
        PTR_LA  v1, except_vec_vi_handler
-FEXPORT(except_vec_vi_lui)
-       lui     v0, 0           /* Patched */
        jr      v1
 FEXPORT(except_vec_vi_ori)
-        ori    v0, 0           /* Patched */
+        ori    v0, zero, 0             /* Offset in vi_handlers[] */
        .set    pop
        END(except_vec_vi)
 EXPORT(except_vec_vi_end)
 
 /*
  * Common Vectored Interrupt code
- * Complete the register saves and invoke the handler which is passed in $v0
+ * Complete the register saves and invoke the handler, $v0 holds
+ * offset into vi_handlers[]
  */
 NESTED(except_vec_vi_handler, 0, sp)
        SAVE_TEMP
@@ -331,6 +330,7 @@ NESTED(except_vec_vi_handler, 0, sp)
        /* Save task's sp on IRQ stack so that unwinding can follow it */
        LONG_S  s1, 0(sp)
 2:
+       PTR_L   v0, vi_handlers(v0)
        jalr    v0
 
        /* Restore sp */
index 316b27d0d2fbd0646460438e25c0314c4a4d3575..dc39f5b3fb8307d7a5a3cb1e02beda10265d62b9 100644 (file)
@@ -55,7 +55,7 @@ NOKPROBE_SYMBOL(insn_has_delayslot);
  * one; putting breakpoint on top of atomic ll/sc pair is bad idea;
  * so we need to prevent it and refuse kprobes insertion for such
  * instructions; cannot do much about breakpoint in the middle of
- * ll/sc pair; it is upto user to avoid those places
+ * ll/sc pair; it is up to user to avoid those places
  */
 static int insn_has_ll_or_sc(union mips_instruction insn)
 {
index f88ce78e13e3a2de9f51d33531398c96d807d7f2..6062e6fa589a87158a1ed1d09eff6eb9152e0e19 100644 (file)
@@ -28,6 +28,8 @@ __init void mips_set_machine_name(const char *name)
 
        strscpy(mips_machine_name, name, sizeof(mips_machine_name));
        pr_info("MIPS: machine is %s\n", mips_get_machine_name());
+
+       dump_stack_set_arch_desc(name);
 }
 
 char *mips_get_machine_name(void)
index 58fc8d089402bd86649596ef422aaee7c7814fcb..7eeeaf1ff95d26e6b3256f3cf20e603d312beef2 100644 (file)
@@ -380,7 +380,7 @@ void *__init relocate_kernel(void)
                }
 #endif /* CONFIG_USE_OF */
 
-               /* Copy the kernel to it's new location */
+               /* Copy the kernel to its new location */
                memcpy(loc_new, &_text, kernel_length);
 
                /* Perform relocations on the new kernel */
index 8f0a7263a9d61ff87ee2af5872e02a380bc6cebc..de894a0211d7a687bc08872c3a6b318a30b379cb 100644 (file)
@@ -70,7 +70,7 @@ copy_word:
 done:
 #ifdef CONFIG_SMP
        /* kexec_flag reset is signal to other CPUs what kernel
-          was moved to it's location. Note - we need relocated address
+          was moved to its location. Note - we need relocated address
           of kexec_flag.  */
 
        bal             1f
index 328426c3ed6f9f74f2217a1c7811ae9fde94f0f9..9c30de1515976159e0210724a6e19313832a0fad 100644 (file)
@@ -147,7 +147,7 @@ static unsigned long __init init_initrd(void)
        /*
         * Board specific code or command line parser should have
         * already set up initrd_start and initrd_end. In these cases
-        * perfom sanity checks and use them if all looks good.
+        * perform sanity checks and use them if all looks good.
         */
        if (!initrd_start || initrd_end <= initrd_start)
                goto disable;
@@ -322,11 +322,11 @@ static void __init bootmem_init(void)
                panic("Incorrect memory mapping !!!");
 
        if (max_pfn > PFN_DOWN(HIGHMEM_START)) {
+               max_low_pfn = PFN_DOWN(HIGHMEM_START);
 #ifdef CONFIG_HIGHMEM
-               highstart_pfn = PFN_DOWN(HIGHMEM_START);
+               highstart_pfn = max_low_pfn;
                highend_pfn = max_pfn;
 #else
-               max_low_pfn = PFN_DOWN(HIGHMEM_START);
                max_pfn = max_low_pfn;
 #endif
        }
index ccbf580827f6e74f904070e48ccd1e39d0b5dce4..4a10f18a880604df29b5a7130ea2682b6c679c42 100644 (file)
@@ -570,7 +570,7 @@ void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
                return (void __user __force *)(-1UL);
 
        /*
-        * FPU emulator may have it's own trampoline active just
+        * FPU emulator may have its own trampoline active just
         * above the user stack, 16-bytes before the next lowest
         * 16 byte boundary.  Try to avoid trashing it.
         */
index c58c0c3c5b40ceed5d61109ca29707f5cfc3572e..dec6878b35f627089226618ff4dc4628855c8eb4 100644 (file)
@@ -2055,108 +2055,71 @@ static void do_default_vi(void)
        panic("Caught unexpected vectored interrupt.");
 }
 
-static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
+void *set_vi_handler(int n, vi_handler_t addr)
 {
+       extern const u8 except_vec_vi[];
+       extern const u8 except_vec_vi_ori[], except_vec_vi_end[];
+       extern const u8 rollback_except_vec_vi[];
        unsigned long handler;
        unsigned long old_handler = vi_handlers[n];
        int srssets = current_cpu_data.srsets;
        u16 *h;
        unsigned char *b;
+       const u8 *vec_start;
+       int ori_offset;
+       int handler_len;
 
        BUG_ON(!cpu_has_veic && !cpu_has_vint);
 
        if (addr == NULL) {
                handler = (unsigned long) do_default_vi;
-               srs = 0;
        } else
                handler = (unsigned long) addr;
        vi_handlers[n] = handler;
 
        b = (unsigned char *)(ebase + 0x200 + n*VECTORSPACING);
 
-       if (srs >= srssets)
-               panic("Shadow register set %d not supported", srs);
-
        if (cpu_has_veic) {
                if (board_bind_eic_interrupt)
-                       board_bind_eic_interrupt(n, srs);
+                       board_bind_eic_interrupt(n, 0);
        } else if (cpu_has_vint) {
                /* SRSMap is only defined if shadow sets are implemented */
                if (srssets > 1)
-                       change_c0_srsmap(0xf << n*4, srs << n*4);
+                       change_c0_srsmap(0xf << n*4, 0 << n*4);
        }
 
-       if (srs == 0) {
-               /*
-                * If no shadow set is selected then use the default handler
-                * that does normal register saving and standard interrupt exit
-                */
-               extern const u8 except_vec_vi[], except_vec_vi_lui[];
-               extern const u8 except_vec_vi_ori[], except_vec_vi_end[];
-               extern const u8 rollback_except_vec_vi[];
-               const u8 *vec_start = using_rollback_handler() ?
-                                     rollback_except_vec_vi : except_vec_vi;
+       vec_start = using_rollback_handler() ? rollback_except_vec_vi :
+                                              except_vec_vi;
 #if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_BIG_ENDIAN)
-               const int lui_offset = except_vec_vi_lui - vec_start + 2;
-               const int ori_offset = except_vec_vi_ori - vec_start + 2;
+       ori_offset = except_vec_vi_ori - vec_start + 2;
 #else
-               const int lui_offset = except_vec_vi_lui - vec_start;
-               const int ori_offset = except_vec_vi_ori - vec_start;
+       ori_offset = except_vec_vi_ori - vec_start;
 #endif
-               const int handler_len = except_vec_vi_end - vec_start;
-
-               if (handler_len > VECTORSPACING) {
-                       /*
-                        * Sigh... panicing won't help as the console
-                        * is probably not configured :(
-                        */
-                       panic("VECTORSPACING too small");
-               }
+       handler_len = except_vec_vi_end - vec_start;
 
-               set_handler(((unsigned long)b - ebase), vec_start,
-#ifdef CONFIG_CPU_MICROMIPS
-                               (handler_len - 1));
-#else
-                               handler_len);
-#endif
-               h = (u16 *)(b + lui_offset);
-               *h = (handler >> 16) & 0xffff;
-               h = (u16 *)(b + ori_offset);
-               *h = (handler & 0xffff);
-               local_flush_icache_range((unsigned long)b,
-                                        (unsigned long)(b+handler_len));
-       }
-       else {
+       if (handler_len > VECTORSPACING) {
                /*
-                * In other cases jump directly to the interrupt handler. It
-                * is the handler's responsibility to save registers if required
-                * (eg hi/lo) and return from the exception using "eret".
+                * Sigh... panicing won't help as the console
+                * is probably not configured :(
                 */
-               u32 insn;
+               panic("VECTORSPACING too small");
+       }
 
-               h = (u16 *)b;
-               /* j handler */
+       set_handler(((unsigned long)b - ebase), vec_start,
 #ifdef CONFIG_CPU_MICROMIPS
-               insn = 0xd4000000 | (((u32)handler & 0x07ffffff) >> 1);
+                       (handler_len - 1));
 #else
-               insn = 0x08000000 | (((u32)handler & 0x0fffffff) >> 2);
+                       handler_len);
 #endif
-               h[0] = (insn >> 16) & 0xffff;
-               h[1] = insn & 0xffff;
-               h[2] = 0;
-               h[3] = 0;
-               local_flush_icache_range((unsigned long)b,
-                                        (unsigned long)(b+8));
-       }
+       /* insert offset into vi_handlers[] */
+       h = (u16 *)(b + ori_offset);
+       *h = n * sizeof(handler);
+       local_flush_icache_range((unsigned long)b,
+                                (unsigned long)(b+handler_len));
 
        return (void *)old_handler;
 }
 
-void *set_vi_handler(int n, vi_handler_t addr)
-{
-       return set_vi_srs_handler(n, addr, 0);
-}
-
 /*
  * Timer interrupt
  */
@@ -2416,7 +2379,7 @@ void __init trap_init(void)
                set_except_vector(i, handle_reserved);
 
        /*
-        * Copy the EJTAG debug exception vector handler code to it's final
+        * Copy the EJTAG debug exception vector handler code to its final
         * destination.
         */
        if (cpu_has_ejtag && board_ejtag_handler_setup)
index e9a0cfd02ae202f0679445d1191964d2633681b2..737d0d4fdcd35161bfd8865ef5de057a7c3da14a 100644 (file)
@@ -6,9 +6,9 @@
  * Copyright (C) 2004, 2005 MIPS Technologies, Inc.  All rights reserved.
  * Copyright (C) 2013 Imagination Technologies Ltd.
  *
- * VPE spport module for loading a MIPS SP program into VPE1. The SP
+ * VPE support module for loading a MIPS SP program into VPE1. The SP
  * environment is rather simple since there are no TLBs. It needs
- * to be relocatable (or partiall linked). Initialize your stack in
+ * to be relocatable (or partially linked). Initialize your stack in
  * the startup-code. The loader looks for the symbol __start and sets
  * up the execution to resume from there. To load and run, simply do
  * a cat SP 'binary' to the /dev/vpe1 device.
index e64372b8f66afca427b78389f37b128e305c5cc2..0feec52222fb97b7f95453e0768d0f303f724e69 100644 (file)
@@ -531,7 +531,7 @@ static void kvm_mips_resume_hrtimer(struct kvm_vcpu *vcpu,
  * to be used for a period of time, but the exact ktime corresponding to the
  * final Count that must be restored is not known.
  *
- * It is gauranteed that a timer interrupt immediately after restore will be
+ * It is guaranteed that a timer interrupt immediately after restore will be
  * handled, but not if CP0_Compare is exactly at @count. That case should
  * already be handled when the hardware timer state is saved.
  *
index 0084820cffaa8d9c905e2a87cd8510e1e2410c9f..b10300a527af243380b2d318a090aca8fbf25ea2 100644 (file)
@@ -17,7 +17,7 @@ static int __init loongson2_cpufreq_init(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
 
-       /* Only 2F revision and it's successors support CPUFreq */
+       /* Only 2F revision and its successors support CPUFreq */
        if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_LOONGSON2F)
                return platform_device_register(&loongson2_cpufreq_device);
 
index 498bdc1bb0ede8aafbf1767065a9002fb2e4b26f..5a990cdef91a6fb44d4b89688022441a85a4303f 100644 (file)
@@ -516,7 +516,7 @@ static void __init loongson3_prepare_cpus(unsigned int max_cpus)
 }
 
 /*
- * Setup the PC, SP, and GP of a secondary processor and start it runing!
+ * Setup the PC, SP, and GP of a secondary processor and start it running!
  */
 static int loongson3_boot_secondary(int cpu, struct task_struct *idle)
 {
index b45bf026ee55e662f328ca4dc162b1365afd3563..10413b6f6662bcf99433725cf4c037a91308b155 100644 (file)
@@ -1650,7 +1650,7 @@ static void coherency_setup(void)
 
        /*
         * c0_status.cu=0 specifies that updates by the sc instruction use
-        * the coherency mode specified by the TLB; 1 means cachable
+        * the coherency mode specified by the TLB; 1 means cacheable
         * coherent update on write will be used.  Not all processors have
         * this bit and; some wire it to zero, others like Toshiba had the
         * silly idea of putting something else there ...
index 45dff5cd4b8e7a0278442acee6818a47bd72eb76..e528583d13311d8a0da246439f40ac613f47a808 100644 (file)
@@ -25,7 +25,7 @@
         * This is a very bad place to be.  Our cache error
         * detection has triggered.  If we have write-back data
         * in the cache, we may not be able to recover.  As a
-        * first-order desperate measure, turn off KSEG0 cacheing.
+        * first-order desperate measure, turn off KSEG0 caching.
         */
        mfc0    k0,CP0_CONFIG
        li      k1,~CONF_CM_CMASK
index c2e0e5aebe903199dfcd144b46e4e6c2b798c26d..39f129205b0c30d3926fe40bbb30921873d6e7c5 100644 (file)
@@ -422,8 +422,17 @@ void __init paging_init(void)
                       " %ldk highmem ignored\n",
                       (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10));
                max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn;
+
+               max_mapnr = max_low_pfn;
+       } else if (highend_pfn) {
+               max_mapnr = highend_pfn;
+       } else {
+               max_mapnr = max_low_pfn;
        }
+#else
+       max_mapnr = max_low_pfn;
 #endif
+       high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
        free_area_init(max_zone_pfns);
 }
@@ -459,13 +468,6 @@ void __init mem_init(void)
         */
        BUILD_BUG_ON(IS_ENABLED(CONFIG_32BIT) && (PFN_PTE_SHIFT > PAGE_SHIFT));
 
-#ifdef CONFIG_HIGHMEM
-       max_mapnr = highend_pfn ? highend_pfn : max_low_pfn;
-#else
-       max_mapnr = max_low_pfn;
-#endif
-       high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
-
        maar_init();
        memblock_free_all();
        setup_zero_pages();     /* Setup zeroed pages.  */
index b6dad2fd5575d7dbfffa201ec5187ab065423108..d8243d61ef32529da9276cd887900bfb5bd130e6 100644 (file)
@@ -72,6 +72,10 @@ void __iomem *ioremap_prot(phys_addr_t phys_addr, unsigned long size,
            flags == _CACHE_UNCACHED)
                return (void __iomem *) CKSEG1ADDR(phys_addr);
 
+       /* Early remaps should use the unmapped regions til' VM is available */
+       if (WARN_ON_ONCE(!slab_is_available()))
+               return NULL;
+
        /*
         * Don't allow anybody to remap RAM that may be allocated by the page
         * allocator, since that could lead to races & data clobbering.
index f6db65410c655ae1fe27e37915e06a4b0d577174..173f7b36033bd222f542b3277f80435c8d6ea6c2 100644 (file)
@@ -183,7 +183,7 @@ void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte)
        int idx, pid;
 
        /*
-        * Handle debugger faulting in for debugee.
+        * Handle debugger faulting in for debuggee.
         */
        if (current->active_mm != vma->vm_mm)
                return;
index 7e2a0011a6fb9b8516125a492b99db4ba16471cc..4106084e57d728679753880eec82892f693f61fb 100644 (file)
@@ -301,7 +301,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte)
        int idx, pid;
 
        /*
-        * Handle debugger faulting in for debugee.
+        * Handle debugger faulting in for debuggee.
         */
        if (current->active_mm != vma->vm_mm)
                return;
index b4e1c783e61779e346e19a8eca88aea1f63f2b19..4017fa0e2f68d2edb315e06bc0011184edf40349 100644 (file)
@@ -789,7 +789,7 @@ void build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
 
        if (check_for_high_segbits) {
                /*
-                * The kernel currently implicitely assumes that the
+                * The kernel currently implicitly assumes that the
                 * MIPS SEGBITS parameter for the processor is
                 * (PGDIR_SHIFT+PGDIR_BITS) or less, and will never
                 * allocate virtual addresses outside the maximum
@@ -1715,7 +1715,7 @@ iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr,
 /*
  * Check if PTE is present, if not then jump to LABEL. PTR points to
  * the page table where this PTE is located, PTE will be re-loaded
- * with it's original value.
+ * with its original value.
  */
 static void
 build_pte_present(u32 **p, struct uasm_reloc **r,
index ace5db3fbd171fc63421cc716c2f00d4967a8501..40a878b672f5d39ddb06667a17fca7003f782e55 100644 (file)
@@ -95,7 +95,7 @@
 /*
  * Mapping of 64-bit eBPF registers to 32-bit native MIPS registers.
  *
- * 1) Native register pairs are ordered according to CPU endiannes, following
+ * 1) Native register pairs are ordered according to CPU endianness, following
  *    the MIPS convention for passing 64-bit arguments and return values.
  * 2) The eBPF return value, arguments and callee-saved registers are mapped
  *    to their native MIPS equivalents.
index 0d1b36ba1c21c9fcf9d57799ea764bc0dadf0b00..068113f5c49d489fb399b4d503fcdeccd7fd3639 100644 (file)
@@ -49,7 +49,7 @@ static int loongson_pcibios_config_access(unsigned char access_type,
                 */
 #ifdef CONFIG_CS5536
                /* cs5536_pci_conf_read4/write4() will call _rdmsr/_wrmsr() to
-                * access the regsters PCI_MSR_ADDR, PCI_MSR_DATA_LO,
+                * access the registers PCI_MSR_ADDR, PCI_MSR_DATA_LO,
                 * PCI_MSR_DATA_HI, which is bigger than PCI_MSR_CTRL, so, it
                 * will not go this branch, but the others. so, no calling dead
                 * loop here.
index 1c722dd0c1302d00abb0e8820ba0d23f1870caff..58625d1b64658ea53a2089ca5271d983f2fdd9aa 100644 (file)
@@ -453,7 +453,7 @@ static int alchemy_pci_probe(struct platform_device *pdev)
 
        /* we can't ioremap the entire pci config space because it's too large,
         * nor can we dynamically ioremap it because some drivers use the
-        * PCI config routines from within atomic contex and that becomes a
+        * PCI config routines from within atomic context and that becomes a
         * problem in get_vm_area().  Instead we use one wired TLB entry to
         * handle all config accesses for all busses.
         */
index e17d862cfa4c6ab586017506f23ca3459d96c6f1..a925842ee1256fd44988e082fba7d1fa25df11e0 100644 (file)
@@ -16,7 +16,7 @@
  * the CFG_SEL bit in the PCI_MISC_CONFIG register.
  *
  * Devices on the bus can perform DMA requests via chip BAR1. PCI host
- * controller BARs are programmend as if an external device is programmed.
+ * controller BARs are programmed as if an external device is programmed.
  * Which means that during configuration, IDSEL pin of the chip should be
  * asserted.
  *
index 80f7293166bb76dee8ec12be4e328a912ced2d7e..68a8cefed420bf41ce99fabffc424bce8eb101e7 100644 (file)
@@ -152,7 +152,7 @@ static int ltq_pci_startup(struct platform_device *pdev)
                temp_buffer &= ~0xf0000;
        /* enable internal arbiter */
        temp_buffer |= (1 << INTERNAL_ARB_ENABLE_BIT);
-       /* enable internal PCI master reqest */
+       /* enable internal PCI master request */
        temp_buffer &= (~(3 << PCI_MASTER0_REQ_MASK_2BITS));
 
        /* enable EBU request */
index d19d9d4563092180229677347f32c6c18464261d..36d12cea3512230f801a96164970bdf9bf241275 100644 (file)
@@ -376,7 +376,7 @@ static void octeon_pci_initialize(void)
        ctl_status.s.timer = 1;
        cvmx_write_csr(CVMX_NPI_CTL_STATUS, ctl_status.u64);
 
-       /* Deassert PCI reset and advertize PCX Host Mode Device Capability
+       /* Deassert PCI reset and advertise PCX Host Mode Device Capability
           (64b) */
        cvmx_write_csr(CVMX_CIU_SOFT_PRST, 0x4);
        cvmx_read_csr(CVMX_CIU_SOFT_PRST);
index 68d5211afea8b4004b6c1d1ec4ff186d61a6cc45..45ddbaa6c1237985b90e7cc49b80ab7fdefb9ecc 100644 (file)
@@ -114,7 +114,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
  *
  * The function is complicated by the ultimate brokenness of the IOC3 chip
  * which is used in SGI systems.  The IOC3 can only handle 32-bit PCI
- * accesses and does only decode parts of it's address space.
+ * accesses and does only decode parts of its address space.
  */
 static int pci_conf0_read_config(struct pci_bus *bus, unsigned int devfn,
                                 int where, int size, u32 *value)
index c9edd3fb380df5ff7c978a3b81ed55bfa6759eee..2583e318e8c6b3d26182438a8732ce6a62fa88d8 100644 (file)
@@ -1037,7 +1037,7 @@ retry:
                        in_fif_p_count = dbg_data.s.data & 0xff;
                } while (in_fif_p_count != ((old_in_fif_p_count+1) & 0xff));
 
-               /* Update in_fif_p_count for it's offset with respect to out_p_count */
+               /* Update in_fif_p_count for its offset with respect to out_p_count */
                in_fif_p_count = (in_fif_p_count + in_p_offset) & 0xff;
 
                /* Read the OUT_P_COUNT from the debug select */
index 137781d0bd0a12a00ad9ab15f002e190bffa9c7e..5a9fd3fe41d7c59ed184603c33b041e714689d7d 100644 (file)
@@ -175,7 +175,7 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info)
                 * mips_cm_probe() wipes out bootloader
                 * config for CM regions and we have to configure them
                 * again. This SoC cannot talk to pamlbus devices
-                * witout proper iocu region set up.
+                * without proper iocu region set up.
                 *
                 * FIXME: it would be better to do this with values
                 * from DT, but we need this very early because
index 8352eb6403b437ff9819c72caa0c228dd78097dd..c57f0d8f3218674fd6eed08c14bae8caf66d0d08 100644 (file)
@@ -21,7 +21,7 @@ static int force_fire_and_forget = 1;
 /**
  * hub_pio_map -  establish a HUB PIO mapping
  *
- * @hub:       hub to perform PIO mapping on
+ * @nasid:     nasid to perform PIO mapping on
  * @widget:    widget ID to perform PIO mapping for
  * @xtalk_addr: xtalk_address that needs to be mapped
  * @size:      size of the PIO mapping
index 5ae30b78d38d3bd5e25cadad8169b99364c45a36..d9249f5a632e0c4a921040df00590ca65c1a0434 100644 (file)
@@ -348,7 +348,7 @@ static void final_fixup(struct pci_dev *dev)
        unsigned char bist;
        int ret;
 
-       /* Do build-in self test */
+       /* Do built-in self test */
        ret = pci_read_config_byte(dev, PCI_BIST, &bist);
        if ((ret != PCIBIOS_SUCCESSFUL) || !(bist & PCI_BIST_CAPABLE))
                return;