mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
A bunch of cleanups from Matt and some dead code removal from Anna-Maria
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXPgy4AAoJEKurIx+X31iBN5MP+wXTiXSbMYcjY0XfZwOqGir0 TMpjzXjxozpU9nPGWLfQj0JlUJYyFDeM6zVq26V1JOfonfloZxUqGT33Y2ue6/xd bzRUrKZChfppLVA0abXd98aHgkHYFoOfReCa9jiFEJ6Fhhuq7l1/9Egp5Z/6oTEm rObWLPzwx9bgYOwh57pabMIunofd6isImrbmSmYLD+iK+ESHDWsvf0zLCSQjHBjJ HkJ5BpH5e+pbi4vQaT1FQW5isaHa1nUZYXhKG4ep8S06Uo86D5L9pEVKB4fDotkA QfAZ/61YdqYVsKQamNrTWDxk/jm71YeMZaTWndIY8gxUDBqn1BONoRCUxQuDxL71 mJpUDSxeT0RGN++zz7uJu4vGO9E6ocSNW/ysXvcvP8aXDE25kmTaX9AqLGejz4xf 6y8MRJW7rDOdOsMcmwx8zX3rc7bbPQ6YfxBI0Efptgi7t/gfDqSoqWrnAIYBJ0RT w4N/O3bVejGn8JdLHhShrtQ6pfrrq9l2FIFqCs+E5fDq+TWPI/SH3+OCWZ+PETbJ eTUI+73dFqiwPiDNDHtlLoPnFIsQyuQ6pSmUgx3YF2FWqQKzxyfj3EQWOpMkRqA4 2sGqmzOkdCpO3GrM0uzdHCKAKcTUke74TPb61tkU+Awf/jGKEkvmPW68jIZZyvEt G+3KF8iYSAF/M2LYZQUb =OJIb -----END PGP SIGNATURE----- Merge tag 'please-pull-misc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 updates from Tony Luck: "A bunch of cleanups from Matt and some dead code removal from Anna-Maria" * tag 'please-pull-misc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64/unaligned: Silence another GCC warning about an uninitialised variable ia64/traps: Silence GCC warning about uninitialised variable ia64: Reduce stack usage by iterating over nodemask ia64/PCI: Remove unused 'addr' and fix build warning ia64/PCI: Fix incorrect PCI resource end address ia64: Remove superfluous SMP function call
This commit is contained in:
commit
03b979dd03
@ -1904,13 +1904,10 @@ static int mca_cpu_callback(struct notifier_block *nfb,
|
|||||||
unsigned long action,
|
unsigned long action,
|
||||||
void *hcpu)
|
void *hcpu)
|
||||||
{
|
{
|
||||||
int hotcpu = (unsigned long) hcpu;
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case CPU_ONLINE:
|
case CPU_ONLINE:
|
||||||
case CPU_ONLINE_FROZEN:
|
case CPU_ONLINE_FROZEN:
|
||||||
smp_call_function_single(hotcpu, ia64_mca_cmc_vector_adjust,
|
ia64_mca_cmc_vector_adjust(NULL);
|
||||||
NULL, 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return NOTIFY_OK;
|
return NOTIFY_OK;
|
||||||
|
@ -548,6 +548,7 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (vector) {
|
switch (vector) {
|
||||||
|
default:
|
||||||
case 29:
|
case 29:
|
||||||
siginfo.si_code = TRAP_HWBKPT;
|
siginfo.si_code = TRAP_HWBKPT;
|
||||||
#ifdef CONFIG_ITANIUM
|
#ifdef CONFIG_ITANIUM
|
||||||
|
@ -1378,6 +1378,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)
|
|||||||
* extract the instruction from the bundle given the slot number
|
* extract the instruction from the bundle given the slot number
|
||||||
*/
|
*/
|
||||||
switch (ipsr->ri) {
|
switch (ipsr->ri) {
|
||||||
|
default:
|
||||||
case 0: u.l = (bundle[0] >> 5); break;
|
case 0: u.l = (bundle[0] >> 5); break;
|
||||||
case 1: u.l = (bundle[0] >> 46) | (bundle[1] << 18); break;
|
case 1: u.l = (bundle[0] >> 46) | (bundle[1] << 18); break;
|
||||||
case 2: u.l = (bundle[1] >> 23); break;
|
case 2: u.l = (bundle[1] >> 23); break;
|
||||||
|
@ -426,7 +426,6 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
|
|||||||
void
|
void
|
||||||
sn_acpi_slot_fixup(struct pci_dev *dev)
|
sn_acpi_slot_fixup(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
void __iomem *addr;
|
|
||||||
struct pcidev_info *pcidev_info = NULL;
|
struct pcidev_info *pcidev_info = NULL;
|
||||||
struct sn_irq_info *sn_irq_info = NULL;
|
struct sn_irq_info *sn_irq_info = NULL;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
@ -151,7 +151,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
|
|||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
unsigned long addr, size;
|
unsigned long size;
|
||||||
struct pcidev_info *pcidev_info;
|
struct pcidev_info *pcidev_info;
|
||||||
struct sn_irq_info *sn_irq_info;
|
struct sn_irq_info *sn_irq_info;
|
||||||
int status;
|
int status;
|
||||||
@ -186,7 +186,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
res->start = pcidev_info->pdi_pio_mapped_addr[idx];
|
res->start = pcidev_info->pdi_pio_mapped_addr[idx];
|
||||||
res->end = addr + size;
|
res->end = res->start + size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if it's already in the device structure, remove it before
|
* if it's already in the device structure, remove it before
|
||||||
|
@ -54,7 +54,7 @@ sn2_ptc_deadlock_recovery_core(volatile unsigned long *, unsigned long,
|
|||||||
volatile unsigned long *, unsigned long,
|
volatile unsigned long *, unsigned long,
|
||||||
volatile unsigned long *, unsigned long);
|
volatile unsigned long *, unsigned long);
|
||||||
void
|
void
|
||||||
sn2_ptc_deadlock_recovery(short *, short, short, int,
|
sn2_ptc_deadlock_recovery(nodemask_t, short, short, int,
|
||||||
volatile unsigned long *, unsigned long,
|
volatile unsigned long *, unsigned long,
|
||||||
volatile unsigned long *, unsigned long);
|
volatile unsigned long *, unsigned long);
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
|
|||||||
int use_cpu_ptcga;
|
int use_cpu_ptcga;
|
||||||
volatile unsigned long *ptc0, *ptc1;
|
volatile unsigned long *ptc0, *ptc1;
|
||||||
unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value, old_rr = 0;
|
unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value, old_rr = 0;
|
||||||
short nasids[MAX_NUMNODES], nix;
|
short nix;
|
||||||
nodemask_t nodes_flushed;
|
nodemask_t nodes_flushed;
|
||||||
int active, max_active, deadlock, flush_opt = sn2_flush_opt;
|
int active, max_active, deadlock, flush_opt = sn2_flush_opt;
|
||||||
|
|
||||||
@ -218,9 +218,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
|
|||||||
}
|
}
|
||||||
|
|
||||||
itc = ia64_get_itc();
|
itc = ia64_get_itc();
|
||||||
nix = 0;
|
nix = nodes_weight(nodes_flushed);
|
||||||
for_each_node_mask(cnode, nodes_flushed)
|
|
||||||
nasids[nix++] = cnodeid_to_nasid(cnode);
|
|
||||||
|
|
||||||
rr_value = (mm->context << 3) | REGION_NUMBER(start);
|
rr_value = (mm->context << 3) | REGION_NUMBER(start);
|
||||||
|
|
||||||
@ -270,8 +268,10 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
|
|||||||
data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK);
|
data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK);
|
||||||
deadlock = 0;
|
deadlock = 0;
|
||||||
active = 0;
|
active = 0;
|
||||||
for (ibegin = 0, i = 0; i < nix; i++) {
|
ibegin = 0;
|
||||||
nasid = nasids[i];
|
i = 0;
|
||||||
|
for_each_node_mask(cnode, nodes_flushed) {
|
||||||
|
nasid = cnodeid_to_nasid(cnode);
|
||||||
if (use_cpu_ptcga && unlikely(nasid == mynasid)) {
|
if (use_cpu_ptcga && unlikely(nasid == mynasid)) {
|
||||||
ia64_ptcga(start, nbits << 2);
|
ia64_ptcga(start, nbits << 2);
|
||||||
ia64_srlz_i();
|
ia64_srlz_i();
|
||||||
@ -286,13 +286,14 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
|
|||||||
if ((deadlock = wait_piowc())) {
|
if ((deadlock = wait_piowc())) {
|
||||||
if (flush_opt == 1)
|
if (flush_opt == 1)
|
||||||
goto done;
|
goto done;
|
||||||
sn2_ptc_deadlock_recovery(nasids, ibegin, i, mynasid, ptc0, data0, ptc1, data1);
|
sn2_ptc_deadlock_recovery(nodes_flushed, ibegin, i, mynasid, ptc0, data0, ptc1, data1);
|
||||||
if (reset_max_active_on_deadlock())
|
if (reset_max_active_on_deadlock())
|
||||||
max_active = 1;
|
max_active = 1;
|
||||||
}
|
}
|
||||||
active = 0;
|
active = 0;
|
||||||
ibegin = i + 1;
|
ibegin = i + 1;
|
||||||
}
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
start += (1UL << nbits);
|
start += (1UL << nbits);
|
||||||
} while (start < end);
|
} while (start < end);
|
||||||
@ -327,11 +328,12 @@ done:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid,
|
sn2_ptc_deadlock_recovery(nodemask_t nodes, short ib, short ie, int mynasid,
|
||||||
volatile unsigned long *ptc0, unsigned long data0,
|
volatile unsigned long *ptc0, unsigned long data0,
|
||||||
volatile unsigned long *ptc1, unsigned long data1)
|
volatile unsigned long *ptc1, unsigned long data1)
|
||||||
{
|
{
|
||||||
short nasid, i;
|
short nasid, i;
|
||||||
|
int cnode;
|
||||||
unsigned long *piows, zeroval, n;
|
unsigned long *piows, zeroval, n;
|
||||||
|
|
||||||
__this_cpu_inc(ptcstats.deadlocks);
|
__this_cpu_inc(ptcstats.deadlocks);
|
||||||
@ -339,17 +341,26 @@ sn2_ptc_deadlock_recovery(short *nasids, short ib, short ie, int mynasid,
|
|||||||
piows = (unsigned long *) pda->pio_write_status_addr;
|
piows = (unsigned long *) pda->pio_write_status_addr;
|
||||||
zeroval = pda->pio_write_status_val;
|
zeroval = pda->pio_write_status_val;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
for_each_node_mask(cnode, nodes) {
|
||||||
|
if (i < ib)
|
||||||
|
goto next;
|
||||||
|
|
||||||
for (i=ib; i <= ie; i++) {
|
if (i > ie)
|
||||||
nasid = nasids[i];
|
break;
|
||||||
|
|
||||||
|
nasid = cnodeid_to_nasid(cnode);
|
||||||
if (local_node_uses_ptc_ga(is_shub1()) && nasid == mynasid)
|
if (local_node_uses_ptc_ga(is_shub1()) && nasid == mynasid)
|
||||||
continue;
|
goto next;
|
||||||
|
|
||||||
ptc0 = CHANGE_NASID(nasid, ptc0);
|
ptc0 = CHANGE_NASID(nasid, ptc0);
|
||||||
if (ptc1)
|
if (ptc1)
|
||||||
ptc1 = CHANGE_NASID(nasid, ptc1);
|
ptc1 = CHANGE_NASID(nasid, ptc1);
|
||||||
|
|
||||||
n = sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows, zeroval);
|
n = sn2_ptc_deadlock_recovery_core(ptc0, data0, ptc1, data1, piows, zeroval);
|
||||||
__this_cpu_add(ptcstats.deadlocks2, n);
|
__this_cpu_add(ptcstats.deadlocks2, n);
|
||||||
|
next:
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user