| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH] MIPS: Get rid of some #ifdefery in arch/mips/mm/tlb-r4k.c |
| From: | David Daney <ddaney.cavm@gmail.com> |
| Date: | Fri, 18 Nov 2011 13:30:09 -0800 |
| Cc: | David Daney <david.daney@cavium.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=98kw5Xc0De8HrbqOnUFmJImoIHzm5Qhg45JqcpipWBs=; b=gFL/+bEfjHP3KVl3Fc2uHARkczHEbBjcA2WYbg+Pr2+fVISBumX8Von2qs3fMISmSN Fdqt04kMN7pGfN1AVhaxV9I+oVJQyZ4HEYerR9YqWMdD43PEyUwL5s6Z3Rkc1INqPKao kRTEWBmgf2lOiNgR2Baq5bfX2+zAZAt3lvUoE= |
| Sender: | linux-mips-bounce@linux-mips.org |
From: David Daney <david.daney@cavium.com>
In the case of !CONFIG_HUGETLB_PAGE, in linux/hugetlb.h we have this
definition:
The other huge page constants in the if(pmd_huge()) block are likewise
defined, so we can get rid of the #ifdef CONFIG_HUGETLB_PAGE an let
the compiler optimize this block away instead. Doing this the code
has a much cleaner appearance.
Signed-off-by: David Daney <david.daney@cavium.com>
---
arch/mips/mm/tlb-r4k.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 88dc49c..f93af98 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -305,7 +305,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned
long address, pte_t pte)
pudp = pud_offset(pgdp, address);
pmdp = pmd_offset(pudp, address);
idx = read_c0_index();
-#ifdef CONFIG_HUGETLB_PAGE
+
/* this could be a huge page */
if (pmd_huge(*pmdp)) {
unsigned long lo;
@@ -321,9 +321,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned
long address, pte_t pte)
else
tlb_write_indexed();
write_c0_pagemask(PM_DEFAULT_MASK);
- } else
-#endif
- {
+ } else {
ptep = pte_offset_map(pmdp, address);
#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32)
--
1.7.2.3
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH RFC 5/5] x86: Select BUILDTIME_EXTABLE_SORT, David Daney |
|---|---|
| Next by Date: | [PATCH] MIPS: ath79: Use kmemdup rather than duplicating its implementation, Thomas Meyer |
| Previous by Thread: | [PATCH RFC 0/5] Speed booting by sorting exception tables at build time., David Daney |
| Next by Thread: | Re: [PATCH] MIPS: Get rid of some #ifdefery in arch/mips/mm/tlb-r4k.c, Sergei Shtylyov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |