Skip to content

Commit

Permalink
Merge tag 'v4.14.327' into 4.14-main
Browse files Browse the repository at this point in the history
This is the 4.14.327 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmUlqXsACgkQONu9yGCS
# aT7KDQ//QlDFupXGqqqAkyOVgKr1eIP0/V6LarJFCRsHt+zTzdijtex7UrAX26R0
# d8cN6oGZmuPJSRifvJkNI2zijVq/K/nYoN5+RA9+TjiYX7+kOsZcmWcjkwEfbDGZ
# SMU13d7owzsqmM48pMQtPkqjxvo+3486icaiNLl+gEPex4BERVSX5k2Nu48J+JKX
# kH4ebxCpiAqlCBXvz0cuR3Eto97cWJV7KiLGdgllhiCInDguIySA5GduPytvm4qx
# +W+Ya1JN3lUxziODoFZ7eG1WrRaw4EigG1YQTvqafu3FVJcm/0Uxl1RHmeMDTcwP
# vWmPHvrCR1x/vYEiAOmV5sOjDJSDKR/LZ8eVi2psgD3BTRo+ESOGtAj7rDyMyznU
# 02SzorFdRUm4VXJOjSnZer3Mv+0vLhXwIM2KYkdcDpXCnvfN3bIvlip17dI6p4yz
# 2/DxB82wr1C/OGPW/jQzKLpZh2JAT3N0Fmoy1R96UTa6tTdiGE7jS7xarwbPJnwZ
# IuF45Vq4Y9FKI3xIn0+7FjbVi7O3X1z95b9v9SH8YoKhzAoKUaRh9RtoPjZmAJt3
# s0JHeMMX7fPJl4C8mjMW1UGcAfysootll1/naGopgNXAl7qj8YrOWpQK8Pavn21q
# AdoAwUOOsM9INMfDFpgJ89dgkixw1jeDSsHMEZtBAj3nWcjIj+8=
# =ac+3
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Oct 10 21:43:55 2023 CEST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
  • Loading branch information
frank-w committed Oct 26, 2023
2 parents 5986d5a + 8164d23 commit 4376cbc
Show file tree
Hide file tree
Showing 63 changed files with 345 additions and 222 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 326
SUBLEVEL = 327
EXTRAVERSION =
NAME = Petit Gorille

Expand Down
36 changes: 20 additions & 16 deletions arch/parisc/include/asm/ldcw.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@
#ifndef __PARISC_LDCW_H
#define __PARISC_LDCW_H

#ifndef CONFIG_PA20
/* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
and GCC only guarantees 8-byte alignment for stack locals, we can't
be assured of 16-byte alignment for atomic lock data even if we
specify "__attribute ((aligned(16)))" in the type declaration. So,
we use a struct containing an array of four ints for the atomic lock
type and dynamically select the 16-byte aligned int from the array
for the semaphore. */
for the semaphore. */

/* From: "Jim Hull" <jim.hull of hp.com>
I've attached a summary of the change, but basically, for PA 2.0, as
long as the ",CO" (coherent operation) completer is implemented, then the
16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
they only require "natural" alignment (4-byte for ldcw, 8-byte for
ldcd).
Although the cache control hint is accepted by all PA 2.0 processors,
it is only implemented on PA8800/PA8900 CPUs. Prior PA8X00 CPUs still
require 16-byte alignment. If the address is unaligned, the operation
of the instruction is undefined. The ldcw instruction does not generate
unaligned data reference traps so misaligned accesses are not detected.
This hid the problem for years. So, restore the 16-byte alignment dropped
by Kyle McMartin in "Remove __ldcw_align for PA-RISC 2.0 processors". */

#define __PA_LDCW_ALIGNMENT 16
#define __PA_LDCW_ALIGN_ORDER 4
Expand All @@ -19,22 +33,12 @@
& ~(__PA_LDCW_ALIGNMENT - 1); \
(volatile unsigned int *) __ret; \
})
#define __LDCW "ldcw"

#else /*CONFIG_PA20*/
/* From: "Jim Hull" <jim.hull of hp.com>
I've attached a summary of the change, but basically, for PA 2.0, as
long as the ",CO" (coherent operation) completer is specified, then the
16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
they only require "natural" alignment (4-byte for ldcw, 8-byte for
ldcd). */

#define __PA_LDCW_ALIGNMENT 4
#define __PA_LDCW_ALIGN_ORDER 2
#define __ldcw_align(a) (&(a)->slock)
#ifdef CONFIG_PA20
#define __LDCW "ldcw,co"

#endif /*!CONFIG_PA20*/
#else
#define __LDCW "ldcw"
#endif

/* LDCW, the only atomic read-write operation PA-RISC has. *sigh*.
We don't explicitly expose that "*a" may be written as reload
Expand Down
3 changes: 3 additions & 0 deletions arch/parisc/include/asm/ropes.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ struct sba_device {
struct ioc ioc[MAX_IOC];
};

/* list of SBA's in system, see drivers/parisc/sba_iommu.c */
extern struct sba_device *sba_list;

#define ASTRO_RUNWAY_PORT 0x582
#define IKE_MERCED_PORT 0x803
#define REO_MERCED_PORT 0x804
Expand Down
5 changes: 0 additions & 5 deletions arch/parisc/include/asm/spinlock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@
#define __ASM_SPINLOCK_TYPES_H

typedef struct {
#ifdef CONFIG_PA20
volatile unsigned int slock;
# define __ARCH_SPIN_LOCK_UNLOCKED { 1 }
#else
volatile unsigned int lock[4];
# define __ARCH_SPIN_LOCK_UNLOCKED { { 1, 1, 1, 1 } }
#endif
} arch_spinlock_t;

typedef struct {
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ union irq_stack_union {
volatile unsigned int lock[1];
};

DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = {
static DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = {
.slock = { 1,1,1,1 },
};
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/perf/hv-24x7.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ static int h_24x7_event_init(struct perf_event *event)
}

domain = event_get_domain(event);
if (domain >= HV_PERF_DOMAIN_MAX) {
if (domain == 0 || domain >= HV_PERF_DOMAIN_MAX) {
pr_devel("invalid domain %d\n", domain);
return -EINVAL;
}
Expand Down
3 changes: 1 addition & 2 deletions arch/xtensa/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@


# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
HOSTFLAGS += -Iarch/$(ARCH)/boot/include
KBUILD_CFLAGS += -fno-builtin

BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")

Expand Down
5 changes: 3 additions & 2 deletions arch/xtensa/boot/lib/zmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
/* bits taken from ppc */

extern void *avail_ram, *end_avail;
void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp);

void exit (void)
static void exit(void)
{
for (;;);
}

void *zalloc(unsigned size)
static void *zalloc(unsigned int size)
{
void *p = avail_ram;

Expand Down
13 changes: 10 additions & 3 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static void ahci_pci_init_controller(struct ata_host *host)

/* clear port IRQ */
tmp = readl(port_mmio + PORT_IRQ_STAT);
VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp);
dev_dbg(&pdev->dev, "PORT_IRQ_STAT 0x%x\n", tmp);
if (tmp)
writel(tmp, port_mmio + PORT_IRQ_STAT);
}
Expand Down Expand Up @@ -1480,7 +1480,6 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance)
u32 irq_stat, irq_masked;
unsigned int handled = 1;

VPRINTK("ENTER\n");
hpriv = host->private_data;
mmio = hpriv->mmio;
irq_stat = readl(mmio + HOST_IRQ_STAT);
Expand All @@ -1497,7 +1496,6 @@ static irqreturn_t ahci_thunderx_irq_handler(int irq, void *dev_instance)
irq_stat = readl(mmio + HOST_IRQ_STAT);
spin_unlock(&host->lock);
} while (irq_stat);
VPRINTK("EXIT\n");

return IRQ_RETVAL(handled);
}
Expand Down Expand Up @@ -1777,6 +1775,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
else
dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n");

if (!(hpriv->cap & HOST_CAP_PART))
host->flags |= ATA_HOST_NO_PART;

if (!(hpriv->cap & HOST_CAP_SSC))
host->flags |= ATA_HOST_NO_SSC;

if (!(hpriv->cap2 & HOST_CAP2_SDS))
host->flags |= ATA_HOST_NO_DEVSLP;

if (pi.flags & ATA_FLAG_EM)
ahci_reset_em(host);

Expand Down
4 changes: 0 additions & 4 deletions drivers/ata/ahci_xgene.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,6 @@ static irqreturn_t xgene_ahci_irq_intr(int irq, void *dev_instance)
void __iomem *mmio;
u32 irq_stat, irq_masked;

VPRINTK("ENTER\n");

hpriv = host->private_data;
mmio = hpriv->mmio;

Expand All @@ -625,8 +623,6 @@ static irqreturn_t xgene_ahci_irq_intr(int irq, void *dev_instance)

spin_unlock(&host->lock);

VPRINTK("EXIT\n");

return IRQ_RETVAL(rc);
}

Expand Down
49 changes: 25 additions & 24 deletions drivers/ata/libahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,26 @@ static ssize_t ahci_activity_show(struct ata_device *dev, char *buf)
return sprintf(buf, "%d\n", emp->blink_policy);
}

static void ahci_port_clear_pending_irq(struct ata_port *ap)
{
struct ahci_host_priv *hpriv = ap->host->private_data;
void __iomem *port_mmio = ahci_port_base(ap);
u32 tmp;

/* clear SError */
tmp = readl(port_mmio + PORT_SCR_ERR);
dev_dbg(ap->host->dev, "PORT_SCR_ERR 0x%x\n", tmp);
writel(tmp, port_mmio + PORT_SCR_ERR);

/* clear port IRQ */
tmp = readl(port_mmio + PORT_IRQ_STAT);
dev_dbg(ap->host->dev, "PORT_IRQ_STAT 0x%x\n", tmp);
if (tmp)
writel(tmp, port_mmio + PORT_IRQ_STAT);

writel(1 << ap->port_no, hpriv->mmio + HOST_IRQ_STAT);
}

static void ahci_port_init(struct device *dev, struct ata_port *ap,
int port_no, void __iomem *mmio,
void __iomem *port_mmio)
Expand All @@ -1210,18 +1230,7 @@ static void ahci_port_init(struct device *dev, struct ata_port *ap,
if (rc)
dev_warn(dev, "%s (%d)\n", emsg, rc);

/* clear SError */
tmp = readl(port_mmio + PORT_SCR_ERR);
VPRINTK("PORT_SCR_ERR 0x%x\n", tmp);
writel(tmp, port_mmio + PORT_SCR_ERR);

/* clear port IRQ */
tmp = readl(port_mmio + PORT_IRQ_STAT);
VPRINTK("PORT_IRQ_STAT 0x%x\n", tmp);
if (tmp)
writel(tmp, port_mmio + PORT_IRQ_STAT);

writel(1 << port_no, mmio + HOST_IRQ_STAT);
ahci_port_clear_pending_irq(ap);

/* mark esata ports */
tmp = readl(port_mmio + PORT_CMD);
Expand All @@ -1248,10 +1257,10 @@ void ahci_init_controller(struct ata_host *host)
}

tmp = readl(mmio + HOST_CTL);
VPRINTK("HOST_CTL 0x%x\n", tmp);
dev_dbg(host->dev, "HOST_CTL 0x%x\n", tmp);
writel(tmp | HOST_IRQ_EN, mmio + HOST_CTL);
tmp = readl(mmio + HOST_CTL);
VPRINTK("HOST_CTL 0x%x\n", tmp);
dev_dbg(host->dev, "HOST_CTL 0x%x\n", tmp);
}
EXPORT_SYMBOL_GPL(ahci_init_controller);

Expand Down Expand Up @@ -1551,6 +1560,8 @@ int ahci_do_hardreset(struct ata_link *link, unsigned int *class,
tf.command = ATA_BUSY;
ata_tf_to_fis(&tf, 0, 0, d2h_fis);

ahci_port_clear_pending_irq(ap);

rc = sata_link_hardreset(link, timing, deadline, online,
ahci_check_ready);

Expand Down Expand Up @@ -1902,17 +1913,13 @@ static irqreturn_t ahci_multi_irqs_intr_hard(int irq, void *dev_instance)
void __iomem *port_mmio = ahci_port_base(ap);
u32 status;

VPRINTK("ENTER\n");

status = readl(port_mmio + PORT_IRQ_STAT);
writel(status, port_mmio + PORT_IRQ_STAT);

spin_lock(ap->lock);
ahci_handle_port_interrupt(ap, port_mmio, status);
spin_unlock(ap->lock);

VPRINTK("EXIT\n");

return IRQ_HANDLED;
}

Expand All @@ -1929,9 +1936,7 @@ u32 ahci_handle_port_intr(struct ata_host *host, u32 irq_masked)
ap = host->ports[i];
if (ap) {
ahci_port_intr(ap);
VPRINTK("port %u\n", i);
} else {
VPRINTK("port %u (no irq)\n", i);
if (ata_ratelimit())
dev_warn(host->dev,
"interrupt on disabled port %u\n", i);
Expand All @@ -1952,8 +1957,6 @@ static irqreturn_t ahci_single_level_irq_intr(int irq, void *dev_instance)
void __iomem *mmio;
u32 irq_stat, irq_masked;

VPRINTK("ENTER\n");

hpriv = host->private_data;
mmio = hpriv->mmio;

Expand Down Expand Up @@ -1981,8 +1984,6 @@ static irqreturn_t ahci_single_level_irq_intr(int irq, void *dev_instance)

spin_unlock(&host->lock);

VPRINTK("EXIT\n");

return IRQ_RETVAL(rc);
}

Expand Down
Loading

0 comments on commit 4376cbc

Please sign in to comment.