Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376586
b: refs/heads/master
c: 1dc735b
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jun 5, 2013
1 parent 417cec2 commit 524fa25
Show file tree
Hide file tree
Showing 32 changed files with 186 additions and 104 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62bc82a82bb1e2b5ee5048c088af7260ddb2b7b5
refs/heads/master: 1dc735bdec9a86d8be1122c43ba52c67aa4e9b30
29 changes: 19 additions & 10 deletions trunk/arch/m68k/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -2752,11 +2752,9 @@ func_return get_new_page
#ifdef CONFIG_MAC

L(scc_initable_mac):
.byte 9,12 /* Reset */
.byte 4,0x44 /* x16, 1 stopbit, no parity */
.byte 3,0xc0 /* receiver: 8 bpc */
.byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */
.byte 9,0 /* no interrupts */
.byte 10,0 /* NRZ */
.byte 11,0x50 /* use baud rate generator */
.byte 12,1,13,0 /* 38400 baud */
Expand Down Expand Up @@ -2899,6 +2897,7 @@ func_start serial_init,%d0/%d1/%a0/%a1
is_not_mac(L(serial_init_not_mac))

#ifdef SERIAL_DEBUG

/* You may define either or both of these. */
#define MAC_USE_SCC_A /* Modem port */
#define MAC_USE_SCC_B /* Printer port */
Expand All @@ -2908,9 +2907,21 @@ func_start serial_init,%d0/%d1/%a0/%a1
#define mac_scc_cha_b_data_offset 0x4
#define mac_scc_cha_a_data_offset 0x6

#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
movel %pc@(L(mac_sccbase)),%a0
/* Reset SCC device */
moveb #9,%a0@(mac_scc_cha_a_ctrl_offset)
moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset)
/* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
/* 5 / 3.6864 MHz = approx. 1.36 us = 68 / 50 MHz */
movel #35,%d0
5:
subq #1,%d0
jne 5b
#endif

#ifdef MAC_USE_SCC_A
/* Initialize channel A */
movel %pc@(L(mac_sccbase)),%a0
lea %pc@(L(scc_initable_mac)),%a1
5: moveb %a1@+,%d0
jmi 6f
Expand All @@ -2922,9 +2933,6 @@ func_start serial_init,%d0/%d1/%a0/%a1

#ifdef MAC_USE_SCC_B
/* Initialize channel B */
#ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */
movel %pc@(L(mac_sccbase)),%a0
#endif /* MAC_USE_SCC_A */
lea %pc@(L(scc_initable_mac)),%a1
7: moveb %a1@+,%d0
jmi 8f
Expand All @@ -2933,6 +2941,7 @@ func_start serial_init,%d0/%d1/%a0/%a1
jra 7b
8:
#endif /* MAC_USE_SCC_B */

#endif /* SERIAL_DEBUG */

jra L(serial_init_done)
Expand Down Expand Up @@ -3006,17 +3015,17 @@ func_start serial_putc,%d0/%d1/%a0/%a1

#ifdef SERIAL_DEBUG

#ifdef MAC_USE_SCC_A
#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
movel %pc@(L(mac_sccbase)),%a1
#endif

#ifdef MAC_USE_SCC_A
3: btst #2,%a1@(mac_scc_cha_a_ctrl_offset)
jeq 3b
moveb %d0,%a1@(mac_scc_cha_a_data_offset)
#endif /* MAC_USE_SCC_A */

#ifdef MAC_USE_SCC_B
#ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */
movel %pc@(L(mac_sccbase)),%a1
#endif /* MAC_USE_SCC_A */
4: btst #2,%a1@(mac_scc_cha_b_ctrl_offset)
jeq 4b
moveb %d0,%a1@(mac_scc_cha_b_data_offset)
Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ appldata_timer_handler(ctl_table *ctl, int write,
return 0;
}
if (!write) {
len = sprintf(buf, appldata_timer_active ? "1\n" : "0\n");
strncpy(buf, appldata_timer_active ? "1\n" : "0\n",
ARRAY_SIZE(buf));
len = strnlen(buf, ARRAY_SIZE(buf));
if (len > *lenp)
len = *lenp;
if (copy_to_user(buffer, buf, len))
Expand Down Expand Up @@ -317,7 +319,8 @@ appldata_generic_handler(ctl_table *ctl, int write,
return 0;
}
if (!write) {
len = sprintf(buf, ops->active ? "1\n" : "0\n");
strncpy(buf, ops->active ? "1\n" : "0\n", ARRAY_SIZE(buf));
len = strnlen(buf, ARRAY_SIZE(buf));
if (len > *lenp)
len = *lenp;
if (copy_to_user(buffer, buf, len)) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);

dma_ops->free(dev, size, cpu_addr, dma_handle, NULL);
debug_dma_free_coherent(dev, size, cpu_addr, dma_handle);
dma_ops->free(dev, size, cpu_addr, dma_handle, NULL);
}

#endif /* _ASM_S390_DMA_MAPPING_H */
1 change: 1 addition & 0 deletions trunk/arch/s390/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ static inline void * phys_to_virt(unsigned long address)
}

void *xlate_dev_mem_ptr(unsigned long phys);
#define xlate_dev_mem_ptr xlate_dev_mem_ptr
void unxlate_dev_mem_ptr(unsigned long phys, void *addr);

/*
Expand Down
15 changes: 11 additions & 4 deletions trunk/arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static inline pgste_t pgste_update_all(pte_t *ptep, pgste_t pgste)
unsigned long address, bits;
unsigned char skey;

if (!pte_present(*ptep))
if (pte_val(*ptep) & _PAGE_INVALID)
return pgste;
address = pte_val(*ptep) & PAGE_MASK;
skey = page_get_storage_key(address);
Expand Down Expand Up @@ -680,7 +680,7 @@ static inline pgste_t pgste_update_young(pte_t *ptep, pgste_t pgste)
#ifdef CONFIG_PGSTE
int young;

if (!pte_present(*ptep))
if (pte_val(*ptep) & _PAGE_INVALID)
return pgste;
/* Get referenced bit from storage key */
young = page_reset_referenced(pte_val(*ptep) & PAGE_MASK);
Expand All @@ -706,7 +706,7 @@ static inline void pgste_set_key(pte_t *ptep, pgste_t pgste, pte_t entry)
unsigned long address;
unsigned long okey, nkey;

if (!pte_present(entry))
if (pte_val(entry) & _PAGE_INVALID)
return;
address = pte_val(entry) & PAGE_MASK;
okey = nkey = page_get_storage_key(address);
Expand Down Expand Up @@ -1098,16 +1098,23 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,
pte = *ptep;
if (!mm_exclusive(mm))
__ptep_ipte(address, ptep);

if (mm_has_pgste(mm))
pgste = pgste_update_all(&pte, pgste);
return pte;
}

static inline void ptep_modify_prot_commit(struct mm_struct *mm,
unsigned long address,
pte_t *ptep, pte_t pte)
{
pgste_t pgste;

if (mm_has_pgste(mm)) {
pgste = *(pgste_t *)(ptep + PTRS_PER_PTE);
pgste_set_key(ptep, pgste, pte);
pgste_set_pte(ptep, pte);
pgste_set_unlock(ptep, *(pgste_t *)(ptep + PTRS_PER_PTE));
pgste_set_unlock(ptep, pgste);
} else
*ptep = pte;
}
Expand Down
27 changes: 11 additions & 16 deletions trunk/arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,34 +428,27 @@ void smp_stop_cpu(void)
* This is the main routine where commands issued by other
* cpus are handled.
*/
static void do_ext_call_interrupt(struct ext_code ext_code,
unsigned int param32, unsigned long param64)
static void smp_handle_ext_call(void)
{
unsigned long bits;
int cpu;

cpu = smp_processor_id();
if (ext_code.code == 0x1202)
inc_irq_stat(IRQEXT_EXC);
else
inc_irq_stat(IRQEXT_EMS);
/*
* handle bit signal external calls
*/
bits = xchg(&pcpu_devices[cpu].ec_mask, 0);

/* handle bit signal external calls */
bits = xchg(&pcpu_devices[smp_processor_id()].ec_mask, 0);
if (test_bit(ec_stop_cpu, &bits))
smp_stop_cpu();

if (test_bit(ec_schedule, &bits))
scheduler_ipi();

if (test_bit(ec_call_function, &bits))
generic_smp_call_function_interrupt();

if (test_bit(ec_call_function_single, &bits))
generic_smp_call_function_single_interrupt();
}

static void do_ext_call_interrupt(struct ext_code ext_code,
unsigned int param32, unsigned long param64)
{
inc_irq_stat(ext_code.code == 0x1202 ? IRQEXT_EXC : IRQEXT_EMS);
smp_handle_ext_call();
}

void arch_send_call_function_ipi_mask(const struct cpumask *mask)
Expand Down Expand Up @@ -760,6 +753,8 @@ int __cpu_disable(void)
{
unsigned long cregs[16];

/* Handle possible pending IPIs */
smp_handle_ext_call();
set_cpu_online(smp_processor_id(), false);
/* Disable pseudo page faults on this cpu. */
pfault_fini();
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static int gmap_connect_pgtable(unsigned long address, unsigned long segment,
mp = (struct gmap_pgtable *) page->index;
rmap->gmap = gmap;
rmap->entry = segment_ptr;
rmap->vmaddr = address;
rmap->vmaddr = address & PMD_MASK;
spin_lock(&mm->page_table_lock);
if (*segment_ptr == segment) {
list_add(&rmap->list, &mp->mapper);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/acard-ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* acard-ahci.c - ACard AHCI SATA support
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ahci.c - AHCI SATA support
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down Expand Up @@ -423,6 +423,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
.driver_data = board_ahci_yes_fbs }, /* 88se9125 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192),
.driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */
{ PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3),
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/ahci.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ahci.h - Common AHCI SATA definitions and declarations
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
17 changes: 16 additions & 1 deletion trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* ata_piix.c - Intel PATA/SATA controllers
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down Expand Up @@ -151,6 +151,7 @@ enum piix_controller_ids {
piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */
ich8_sata_snb,
ich8_2port_sata_snb,
ich8_2port_sata_byt,
};

struct piix_map_db {
Expand Down Expand Up @@ -334,6 +335,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Wellsburg) */
{ 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (BayTrail) */
{ 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
{ 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },

{ } /* terminate list */
};
Expand Down Expand Up @@ -441,6 +445,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
[tolapai_sata] = &tolapai_map_db,
[ich8_sata_snb] = &ich8_map_db,
[ich8_2port_sata_snb] = &ich8_2port_map_db,
[ich8_2port_sata_byt] = &ich8_2port_map_db,
};

static struct pci_bits piix_enable_bits[] = {
Expand Down Expand Up @@ -1254,6 +1259,16 @@ static struct ata_port_info piix_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &piix_sata_ops,
},

[ich8_2port_sata_byt] =
{
.flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR | PIIX_FLAG_PIO16,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.udma_mask = ATA_UDMA6,
.port_ops = &piix_sata_ops,
},

};

#define AHCI_PCI_BAR 5
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libahci.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* libahci.c - Common AHCI SATA low-level routines
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* libata-core.c - helper library for ATA
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down Expand Up @@ -1602,6 +1602,12 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
qc->tf = *tf;
if (cdb)
memcpy(qc->cdb, cdb, ATAPI_CDB_LEN);

/* some SATA bridges need us to indicate data xfer direction */
if (tf->protocol == ATAPI_PROT_DMA && (dev->flags & ATA_DFLAG_DMADIR) &&
dma_dir == DMA_FROM_DEVICE)
qc->tf.feature |= ATAPI_DMADIR;

qc->flags |= ATA_QCFLAG_RESULT_TF;
qc->dma_dir = dma_dir;
if (dma_dir != DMA_NONE) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* libata-eh.c - libata error handling
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* libata-scsi.c - helper library for ATA
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-sff.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* libata-sff.c - helper library for PCI IDE BMDMA
*
* Maintained by: Jeff Garzik <jgarzik@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
* Please ALWAYS copy linux-ide@vger.kernel.org
* on emails.
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pdc_adma.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* pdc_adma.c - Pacific Digital Corporation ADMA
*
* Maintained by: Mark Lord <mlord@pobox.com>
* Maintained by: Tejun Heo <tj@kernel.org>
*
* Copyright 2005 Mark Lord
*
Expand Down
Loading

0 comments on commit 524fa25

Please sign in to comment.