Skip to content

Commit

Permalink
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/qe_ic: Fix another breakage from the irq_data conversion
  powerpc/8xx: Fix another breakage from the irq_data conversion
  powerpc/cell: Use handle_edge_eoi_irq for real
  powerpc/pseries: Enable Chelsio network and iWARP drivers
  powerpc/mm: Move the STAB0 location to 0x8000 to make room in low memory
  powerpc: Fix accounting of softirq time when idle
  powerpc/pseries/smp: query-cpu-stopped-state support won't change
  powerpc/xics: Use hwirq for xics domain irq number
  powerpc/xics: Fix numberspace mismatch from irq_desc conversion
  powerpc: Wire up new syscalls
  powerpc/booke: Correct the SPRN_MAS5 definition.
  powerpc: ARCH_PFN_OFFSET should be unsigned long
  powerpc: Implement dma_mmap_coherent()
  powerpc/nvram: Don't overwrite oops/panic report on normal shutdown
  powerpc: Restore some misc devices to our configs
  • Loading branch information
torvalds committed Mar 30, 2011
2 parents a8a4492 + d4db35e commit a8e498b
Show file tree
Hide file tree
Showing 31 changed files with 160 additions and 65 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/configs/44x/warp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ CONFIG_MTD_NAND_NDFC=y
CONFIG_MTD_UBI=y
CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_RAM=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/52xx/motionpro_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_SCSI_TGT=y
CONFIG_BLK_DEV_SD=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/86xx/gef_ppc9a_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_DS1682=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDECS=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/86xx/gef_sbc310_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_DS1682=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDECS=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/86xx/gef_sbc610_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_DS1682=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/e55xx_smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_INPUT_FF_MEMLESS=m
# CONFIG_INPUT_MOUSEDEV is not set
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/linkstation_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=2
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=m
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/mpc512x_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_XIP=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/mpc5200_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=32768
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT24=y
CONFIG_SCSI_TGT=y
CONFIG_BLK_DEV_SD=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/mpc85xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/mpc85xx_smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/mpc86xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=131072
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/pasemi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_LEGACY=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDECD=y
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/configs/ppc6xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_CDROM_PKTCDVD=m
CONFIG_VIRTIO_BLK=m
CONFIG_BLK_DEV_HD=y
CONFIG_MISC_DEVICES=y
CONFIG_ENCLOSURE_SERVICES=m
CONFIG_SENSORS_TSL2550=m
CONFIG_EEPROM_AT24=m
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/configs/pseries_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ CONFIG_TIGON3=y
CONFIG_BNX2=m
CONFIG_CHELSIO_T1=m
CONFIG_CHELSIO_T3=m
CONFIG_CHELSIO_T4=m
CONFIG_EHEA=y
CONFIG_IXGBE=m
CONFIG_IXGB=m
Expand Down Expand Up @@ -255,6 +256,8 @@ CONFIG_INFINIBAND_USER_MAD=m
CONFIG_INFINIBAND_USER_ACCESS=m
CONFIG_INFINIBAND_MTHCA=m
CONFIG_INFINIBAND_EHCA=m
CONFIG_INFINIBAND_CXGB3=m
CONFIG_INFINIBAND_CXGB4=m
CONFIG_MLX4_INFINIBAND=m
CONFIG_INFINIBAND_IPOIB=m
CONFIG_INFINIBAND_IPOIB_CM=y
Expand Down
6 changes: 6 additions & 0 deletions arch/powerpc/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ extern void __dma_free_coherent(size_t size, void *vaddr);
extern void __dma_sync(void *vaddr, size_t size, int direction);
extern void __dma_sync_page(struct page *page, unsigned long offset,
size_t size, int direction);
extern unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr);

#else /* ! CONFIG_NOT_COHERENT_CACHE */
/*
Expand Down Expand Up @@ -198,6 +199,11 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)

extern int dma_mmap_coherent(struct device *, struct vm_area_struct *,
void *, dma_addr_t, size_t);
#define ARCH_HAS_DMA_MMAP_COHERENT


static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
enum dma_data_direction direction)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/mmu-hash64.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define STE_VSID_SHIFT 12

/* Location of cpu0's segment table */
#define STAB0_PAGE 0x6
#define STAB0_PAGE 0x8
#define STAB0_OFFSET (STAB0_PAGE << 12)
#define STAB0_PHYS_ADDR (STAB0_OFFSET + PHYSICAL_START)

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extern phys_addr_t kernstart_addr;
#endif

#ifdef CONFIG_FLATMEM
#define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT)
#define ARCH_PFN_OFFSET ((unsigned long)(MEMORY_START >> PAGE_SHIFT))
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
#endif

Expand Down
16 changes: 8 additions & 8 deletions arch/powerpc/include/asm/qe_ic.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high);
static inline void qe_ic_cascade_low_ipic(unsigned int irq,
struct irq_desc *desc)
{
struct qe_ic *qe_ic = get_irq_desc_data(desc);
struct qe_ic *qe_ic = irq_desc_get_chip_data(desc);
unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);

if (cascade_irq != NO_IRQ)
Expand All @@ -91,7 +91,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq,
static inline void qe_ic_cascade_high_ipic(unsigned int irq,
struct irq_desc *desc)
{
struct qe_ic *qe_ic = get_irq_desc_data(desc);
struct qe_ic *qe_ic = irq_desc_get_chip_data(desc);
unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);

if (cascade_irq != NO_IRQ)
Expand All @@ -101,9 +101,9 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq,
static inline void qe_ic_cascade_low_mpic(unsigned int irq,
struct irq_desc *desc)
{
struct qe_ic *qe_ic = get_irq_desc_data(desc);
struct qe_ic *qe_ic = irq_desc_get_chip_data(desc);
unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
struct irq_chip *chip = get_irq_desc_chip(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);

if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
Expand All @@ -114,9 +114,9 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq,
static inline void qe_ic_cascade_high_mpic(unsigned int irq,
struct irq_desc *desc)
{
struct qe_ic *qe_ic = get_irq_desc_data(desc);
struct qe_ic *qe_ic = irq_desc_get_chip_data(desc);
unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
struct irq_chip *chip = get_irq_desc_chip(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);

if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
Expand All @@ -127,9 +127,9 @@ static inline void qe_ic_cascade_high_mpic(unsigned int irq,
static inline void qe_ic_cascade_muxed_mpic(unsigned int irq,
struct irq_desc *desc)
{
struct qe_ic *qe_ic = get_irq_desc_data(desc);
struct qe_ic *qe_ic = irq_desc_get_chip_data(desc);
unsigned int cascade_irq;
struct irq_chip *chip = get_irq_desc_chip(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);

cascade_irq = qe_ic_get_high_irq(qe_ic);
if (cascade_irq == NO_IRQ)
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/reg_booke.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
#define SPRN_MAS2 0x272 /* MMU Assist Register 2 */
#define SPRN_MAS3 0x273 /* MMU Assist Register 3 */
#define SPRN_MAS4 0x274 /* MMU Assist Register 4 */
#define SPRN_MAS5 0x275 /* MMU Assist Register 5 */
#define SPRN_MAS5 0x153 /* MMU Assist Register 5 */
#define SPRN_MAS6 0x276 /* MMU Assist Register 6 */
#define SPRN_PID1 0x279 /* Process ID Register 1 */
#define SPRN_PID2 0x27A /* Process ID Register 2 */
Expand Down
4 changes: 4 additions & 0 deletions arch/powerpc/include/asm/systbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,7 @@ COMPAT_SYS_SPU(sendmsg)
COMPAT_SYS_SPU(recvmsg)
COMPAT_SYS_SPU(recvmmsg)
SYSCALL_SPU(accept4)
SYSCALL_SPU(name_to_handle_at)
COMPAT_SYS_SPU(open_by_handle_at)
COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
6 changes: 5 additions & 1 deletion arch/powerpc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,14 @@
#define __NR_recvmsg 342
#define __NR_recvmmsg 343
#define __NR_accept4 344
#define __NR_name_to_handle_at 345
#define __NR_open_by_handle_at 346
#define __NR_clock_adjtime 347
#define __NR_syncfs 348

#ifdef __KERNEL__

#define __NR_syscalls 345
#define __NR_syscalls 349

#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
Expand Down
18 changes: 18 additions & 0 deletions arch/powerpc/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,21 @@ static int __init dma_init(void)
return 0;
}
fs_initcall(dma_init);

int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
void *cpu_addr, dma_addr_t handle, size_t size)
{
unsigned long pfn;

#ifdef CONFIG_NOT_COHERENT_CACHE
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
pfn = __dma_get_coherent_pfn((unsigned long)cpu_addr);
#else
pfn = page_to_pfn(virt_to_page(cpu_addr));
#endif
return remap_pfn_range(vma, vma->vm_start,
pfn + vma->vm_pgoff,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
}
EXPORT_SYMBOL_GPL(dma_mmap_coherent);
28 changes: 14 additions & 14 deletions arch/powerpc/kernel/exceptions-64s.S
Original file line number Diff line number Diff line change
Expand Up @@ -977,20 +977,6 @@ _GLOBAL(do_stab_bolted)
rfid
b . /* prevent speculative execution */

/*
* Space for CPU0's segment table.
*
* On iSeries, the hypervisor must fill in at least one entry before
* we get control (with relocate on). The address is given to the hv
* as a page number (see xLparMap below), so this must be at a
* fixed address (the linker can't compute (u64)&initial_stab >>
* PAGE_SHIFT).
*/
. = STAB0_OFFSET /* 0x6000 */
.globl initial_stab
initial_stab:
.space 4096

#ifdef CONFIG_PPC_PSERIES
/*
* Data area reserved for FWNMI option.
Expand Down Expand Up @@ -1027,3 +1013,17 @@ xLparMap:
#ifdef CONFIG_PPC_PSERIES
. = 0x8000
#endif /* CONFIG_PPC_PSERIES */

/*
* Space for CPU0's segment table.
*
* On iSeries, the hypervisor must fill in at least one entry before
* we get control (with relocate on). The address is given to the hv
* as a page number (see xLparMap above), so this must be at a
* fixed address (the linker can't compute (u64)&initial_stab >>
* PAGE_SHIFT).
*/
. = STAB0_OFFSET /* 0x8000 */
.globl initial_stab
initial_stab:
.space 4096
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void account_system_vtime(struct task_struct *tsk)
}
get_paca()->user_time_scaled += user_scaled;

if (in_irq() || idle_task(smp_processor_id()) != tsk) {
if (in_interrupt() || idle_task(smp_processor_id()) != tsk) {
account_system_time(tsk, 0, delta, sys_scaled);
if (stolen)
account_steal_time(stolen);
Expand Down
20 changes: 20 additions & 0 deletions arch/powerpc/mm/dma-noncoherent.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,23 @@ void __dma_sync_page(struct page *page, unsigned long offset,
#endif
}
EXPORT_SYMBOL(__dma_sync_page);

/*
* Return the PFN for a given cpu virtual address returned by
* __dma_alloc_coherent. This is used by dma_mmap_coherent()
*/
unsigned long __dma_get_coherent_pfn(unsigned long cpu_addr)
{
/* This should always be populated, so we don't test every
* level. If that fails, we'll have a nice crash which
* will be as good as a BUG_ON()
*/
pgd_t *pgd = pgd_offset_k(cpu_addr);
pud_t *pud = pud_offset(pgd, cpu_addr);
pmd_t *pmd = pmd_offset(pud, cpu_addr);
pte_t *ptep = pte_offset_kernel(pmd, cpu_addr);

if (pte_none(*ptep) || !pte_present(*ptep))
return 0;
return pte_pfn(*ptep);
}
24 changes: 24 additions & 0 deletions arch/powerpc/platforms/pseries/nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,32 @@ static void oops_to_nvram(struct kmsg_dumper *dumper,
const char *new_msgs, unsigned long new_len)
{
static unsigned int oops_count = 0;
static bool panicking = false;
size_t text_len;

switch (reason) {
case KMSG_DUMP_RESTART:
case KMSG_DUMP_HALT:
case KMSG_DUMP_POWEROFF:
/* These are almost always orderly shutdowns. */
return;
case KMSG_DUMP_OOPS:
case KMSG_DUMP_KEXEC:
break;
case KMSG_DUMP_PANIC:
panicking = true;
break;
case KMSG_DUMP_EMERG:
if (panicking)
/* Panic report already captured. */
return;
break;
default:
pr_err("%s: ignoring unrecognized KMSG_DUMP_* reason %d\n",
__FUNCTION__, (int) reason);
return;
}

if (clobbering_unread_rtas_event())
return;

Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/platforms/pseries/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ int smp_query_cpu_stopped(unsigned int pcpu)
int qcss_tok = rtas_token("query-cpu-stopped-state");

if (qcss_tok == RTAS_UNKNOWN_SERVICE) {
printk(KERN_INFO "Firmware doesn't support "
"query-cpu-stopped-state\n");
printk_once(KERN_INFO
"Firmware doesn't support query-cpu-stopped-state\n");
return QCSS_HARDWARE_ERROR;
}

Expand Down
Loading

0 comments on commit a8e498b

Please sign in to comment.