Merge branch 'parisc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "The most important changes in this patch set are: - DMA-related cleanups for parisc with the aim to move anything not required by drivers out of <asm/dma-mapping.h>, by Christoph Hellwig - Switch to memblock_alloc(), by Mike Rapoport - Makefile cleanups by Masahiro Yamada - Switch to bust_spinlocks(), by Sergey Senozhatsky - Improved initial SMP affinity selection for IRQs - Added IPI- and rescheduling interrupts in /proc/interrupts output" * 'parisc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (21 commits) parisc: use memblock_alloc() instead of custom get_memblock() parisc: Add constants for various PDC firmware calls parisc: Add constant for PDC_PAT_COMPLEX firmware call parisc: Show machine product number during boot parisc: Add constants for PDC_RELOCATE PDC call parisc: Add PDC_CRASH_PREP PDC function number parisc: Use F_EXTEND() macro in iosapic code parisc: remove the HBA_DATA macro parisc/lba_pci: use container_of in LBA_DEV parisc/dino: use container_of in DINO_DEV parisc: properly type the return value of parisc_walk_tree parisc: properly type the iommu field in struct pci_hba_data parisc: turn GET_IOC into an inline function parisc: move internal implementation details out of <asm/dma-mapping.h> parisc: don't include <asm/cacheflush.h> in <asm/dma-mapping.h> parisc: remove meaningless ccflags-y in arch/parisc/boot/Makefile parisc: replace oops_in_progress manipulation with bust_spinlocks() parisc: Improve initial IRQ to CPU assignment parisc: Count IPI function call interrupts parisc: Show rescheduling interrupts on SMP machines only ...
This commit is contained in:
@@ -568,6 +568,30 @@ int pdc_model_capabilities(unsigned long *capabilities)
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* pdc_model_platform_info - Returns machine product and serial number.
|
||||
* @orig_prod_num: Return buffer for original product number.
|
||||
* @current_prod_num: Return buffer for current product number.
|
||||
* @serial_no: Return buffer for serial number.
|
||||
*
|
||||
* Returns strings containing the original and current product numbers and the
|
||||
* serial number of the system.
|
||||
*/
|
||||
int pdc_model_platform_info(char *orig_prod_num, char *current_prod_num,
|
||||
char *serial_no)
|
||||
{
|
||||
int retval;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&pdc_lock, flags);
|
||||
retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_GET_PLATFORM_INFO,
|
||||
__pa(orig_prod_num), __pa(current_prod_num), __pa(serial_no));
|
||||
convert_to_wide(pdc_result);
|
||||
spin_unlock_irqrestore(&pdc_lock, flags);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* pdc_cache_info - Return cache and TLB information.
|
||||
* @cache_info: The return buffer.
|
||||
|
@@ -117,7 +117,10 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)
|
||||
return -EINVAL;
|
||||
|
||||
/* whatever mask they set, we just allow one CPU */
|
||||
cpu_dest = cpumask_first_and(dest, cpu_online_mask);
|
||||
cpu_dest = cpumask_next_and(d->irq & (num_online_cpus()-1),
|
||||
dest, cpu_online_mask);
|
||||
if (cpu_dest >= nr_cpu_ids)
|
||||
cpu_dest = cpumask_first_and(dest, cpu_online_mask);
|
||||
|
||||
return cpu_dest;
|
||||
}
|
||||
@@ -175,10 +178,16 @@ int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
# endif
|
||||
#endif
|
||||
#ifdef CONFIG_SMP
|
||||
seq_printf(p, "%*s: ", prec, "RES");
|
||||
for_each_online_cpu(j)
|
||||
seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count);
|
||||
seq_puts(p, " Rescheduling interrupts\n");
|
||||
if (num_online_cpus() > 1) {
|
||||
seq_printf(p, "%*s: ", prec, "RES");
|
||||
for_each_online_cpu(j)
|
||||
seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count);
|
||||
seq_puts(p, " Rescheduling interrupts\n");
|
||||
seq_printf(p, "%*s: ", prec, "CAL");
|
||||
for_each_online_cpu(j)
|
||||
seq_printf(p, "%10u ", irq_stats(j)->irq_call_count);
|
||||
seq_puts(p, " Function call interrupts\n");
|
||||
}
|
||||
#endif
|
||||
seq_printf(p, "%*s: ", prec, "UAH");
|
||||
for_each_online_cpu(j)
|
||||
|
@@ -242,6 +242,7 @@ static int __init processor_probe(struct parisc_device *dev)
|
||||
void __init collect_boot_cpu_data(void)
|
||||
{
|
||||
unsigned long cr16_seed;
|
||||
char orig_prod_num[64], current_prod_num[64], serial_no[64];
|
||||
|
||||
memset(&boot_cpu_data, 0, sizeof(boot_cpu_data));
|
||||
|
||||
@@ -301,6 +302,14 @@ void __init collect_boot_cpu_data(void)
|
||||
_parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) ||
|
||||
(boot_cpu_data.cpu_type == mako2);
|
||||
#endif
|
||||
|
||||
if (pdc_model_platform_info(orig_prod_num, current_prod_num, serial_no) == PDC_OK) {
|
||||
printk(KERN_INFO "product %s, original product %s, S/N: %s\n",
|
||||
current_prod_num, orig_prod_num, serial_no);
|
||||
add_device_randomness(orig_prod_num, strlen(orig_prod_num));
|
||||
add_device_randomness(current_prod_num, strlen(current_prod_num));
|
||||
add_device_randomness(serial_no, strlen(serial_no));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include <linux/sched/clock.h>
|
||||
#include <linux/start_kernel.h>
|
||||
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/pdc.h>
|
||||
|
@@ -155,6 +155,7 @@ ipi_interrupt(int irq, void *dev_id)
|
||||
|
||||
case IPI_CALL_FUNC:
|
||||
smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu);
|
||||
inc_irq_stat(irq_call_count);
|
||||
generic_smp_call_function_interrupt();
|
||||
break;
|
||||
|
||||
|
@@ -218,7 +218,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
|
||||
return;
|
||||
}
|
||||
|
||||
oops_in_progress = 1;
|
||||
bust_spinlocks(1);
|
||||
|
||||
oops_enter();
|
||||
|
||||
@@ -396,7 +396,7 @@ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long o
|
||||
{
|
||||
static DEFINE_SPINLOCK(terminate_lock);
|
||||
|
||||
oops_in_progress = 1;
|
||||
bust_spinlocks(1);
|
||||
|
||||
set_eiem(0);
|
||||
local_irq_disable();
|
||||
|
Reference in New Issue
Block a user