This is a note to let you know that I've just added the patch titled sparc64: Use 'ILOG2_4MB' instead of constant '22'. to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: sparc64-use-ilog2_4mb-instead-of-constant-22.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Fri Aug 8 08:54:13 PDT 2014 From: "David S. Miller" <davem@xxxxxxxxxxxxx> Date: Sat, 3 May 2014 22:52:50 -0700 Subject: sparc64: Use 'ILOG2_4MB' instead of constant '22'. From: "David S. Miller" <davem@xxxxxxxxxxxxx> [ Upstream commit 0eef331a3d0ee970dcbebd1bd5fcb57ca33ece01 ] Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/sparc/include/asm/pgtable_64.h | 2 +- arch/sparc/kernel/head_64.S | 4 ++-- arch/sparc/kernel/ktlb.S | 2 +- arch/sparc/mm/init_64.c | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -918,7 +918,7 @@ static inline bool kern_addr_valid(unsig if ((paddr >> MAX_PHYS_ADDRESS_BITS) != 0UL) return false; - return test_bit(paddr >> 22, sparc64_valid_addr_bitmap); + return test_bit(paddr >> ILOG2_4MB, sparc64_valid_addr_bitmap); } extern int page_in_phys_avail(unsigned long paddr); --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S @@ -282,8 +282,8 @@ sun4v_chip_type: stx %l2, [%l4 + 0x0] ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low /* 4MB align */ - srlx %l3, 22, %l3 - sllx %l3, 22, %l3 + srlx %l3, ILOG2_4MB, %l3 + sllx %l3, ILOG2_4MB, %l3 stx %l3, [%l4 + 0x8] /* Leave service as-is, "call-method" */ --- a/arch/sparc/kernel/ktlb.S +++ b/arch/sparc/kernel/ktlb.S @@ -277,7 +277,7 @@ kvmap_dtlb_load: #ifdef CONFIG_SPARSEMEM_VMEMMAP kvmap_vmemmap: sub %g4, %g5, %g5 - srlx %g5, 22, %g5 + srlx %g5, ILOG2_4MB, %g5 sethi %hi(vmemmap_table), %g1 sllx %g5, 3, %g5 or %g1, %lo(vmemmap_table), %g1 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -588,7 +588,7 @@ static void __init remap_kernel(void) int i, tlb_ent = sparc64_highest_locked_tlbent(); tte_vaddr = (unsigned long) KERNBASE; - phys_page = (prom_boot_mapping_phys_low >> 22UL) << 22UL; + phys_page = (prom_boot_mapping_phys_low >> ILOG2_4MB) << ILOG2_4MB; tte_data = kern_large_tte(phys_page); kern_locked_tte_data = tte_data; @@ -1881,7 +1881,7 @@ void __init paging_init(void) BUILD_BUG_ON(NR_CPUS > 4096); - kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; + kern_base = (prom_boot_mapping_phys_low >> ILOG2_4MB) << ILOG2_4MB; kern_size = (unsigned long)&_end - (unsigned long)KERNBASE; /* Invalidate both kernel TSBs. */ @@ -1937,7 +1937,7 @@ void __init paging_init(void) shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE); real_end = (unsigned long)_end; - num_kernel_image_mappings = DIV_ROUND_UP(real_end - KERNBASE, 1 << 22); + num_kernel_image_mappings = DIV_ROUND_UP(real_end - KERNBASE, 1 << ILOG2_4MB); printk("Kernel: Using %d locked TLB entries for main kernel image.\n", num_kernel_image_mappings); @@ -2094,7 +2094,7 @@ static void __init setup_valid_addr_bitm if (new_start <= old_start && new_end >= (old_start + PAGE_SIZE)) { - set_bit(old_start >> 22, bitmap); + set_bit(old_start >> ILOG2_4MB, bitmap); goto do_next_page; } } @@ -2143,7 +2143,7 @@ void __init mem_init(void) addr = PAGE_OFFSET + kern_base; last = PAGE_ALIGN(kern_size) + addr; while (addr < last) { - set_bit(__pa(addr) >> 22, sparc64_valid_addr_bitmap); + set_bit(__pa(addr) >> ILOG2_4MB, sparc64_valid_addr_bitmap); addr += PAGE_SIZE; } @@ -2267,7 +2267,7 @@ int __meminit vmemmap_populate(unsigned void *block; if (!(*vmem_pp & _PAGE_VALID)) { - block = vmemmap_alloc_block(1UL << 22, node); + block = vmemmap_alloc_block(1UL << ILOG2_4MB, node); if (!block) return -ENOMEM; Patches currently in stable-queue which might be from davem@xxxxxxxxxxxxx are queue-3.14/sctp-fix-possible-seqlock-seadlock-in-sctp_packet_transmit.patch queue-3.14/sparc64-add-basic-validations-to-pud-pmd-_bad.patch queue-3.14/net-sendmsg-fix-null-pointer-dereference.patch queue-3.14/sparc64-ldc_connect-should-not-return-einval-when-handshake-is-in-progress.patch queue-3.14/sparc64-do-not-insert-non-valid-ptes-into-the-tsb-hash-table.patch queue-3.14/iovec-make-sure-the-caller-actually-wants-anything-in-memcpy_fromiovecend.patch queue-3.14/net-phy-re-apply-phy-fixups-during-phy_register_device.patch queue-3.14/sparc64-fix-hex-values-in-comment-above-pte_modify.patch queue-3.14/sparc64-don-t-bark-so-loudly-about-32-bit-tasks-generating-64-bit-fault-addresses.patch queue-3.14/sparc64-fix-argument-sign-extension-for-compat_sys_futex.patch queue-3.14/arch-sparc-math-emu-math_32.c-drop-stray-break-operator.patch queue-3.14/net-correctly-set-segment-mac_len-in-skb_segment.patch queue-3.14/sparc64-fix-executable-bit-testing-in-set_pmd_at-paths.patch queue-3.14/ip-make-ip-identifiers-less-predictable.patch queue-3.14/sparc64-fix-top-level-fault-handling-bugs.patch queue-3.14/sparc64-fix-huge-tsb-mapping-on-pre-ultrasparc-iii-cpus.patch queue-3.14/sparc64-give-more-detailed-information-in-pgd-pmd-_error-and-kill-pte_error.patch queue-3.14/bnx2x-fix-crash-during-tso-tunneling.patch queue-3.14/sparc64-don-t-use-_page_present-in-pte_modify-mask.patch queue-3.14/sparc64-make-itc_sync_lock-raw.patch queue-3.14/bbc-i2c-fix-bbc-i2c-envctrl-on-sunblade-2000.patch queue-3.14/sparc64-handle-32-bit-tasks-properly-in-compute_effective_address.patch queue-3.14/sunsab-fix-detection-of-break-on-sunsab-serial-console.patch queue-3.14/ip_tunnel-ipv4-fix-tunnels-with-local-any-remote-remote_ip.patch queue-3.14/net-sctp-inherit-auth_capable-on-init-collisions.patch queue-3.14/sparc64-fix-bugs-in-get_user_pages_fast-wrt.-thp.patch queue-3.14/sparc64-fix-huge-pmd-invalidation.patch queue-3.14/macvlan-initialize-vlan_features-to-turn-on-offload-support.patch queue-3.14/tcp-fix-integer-overflow-in-tcp-vegas.patch queue-3.14/inetpeer-get-rid-of-ip_id_count.patch queue-3.14/sparc64-use-ilog2_4mb-instead-of-constant-22.patch queue-3.14/bna-fix-performance-regression.patch queue-3.14/sparc64-add-membar-to-niagara2-memcpy-code.patch queue-3.14/sparc64-fix-range-check-in-kern_addr_valid.patch queue-3.14/sparc64-guard-against-flushing-openfirmware-mappings.patch queue-3.14/tcp-fix-integer-overflows-in-tcp-veno.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html