All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <87a9qh880y.fsf@linux.vnet.ibm.com>

diff --git a/a/1.txt b/N1/1.txt
index d50290f..644bb76 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -2,26 +2,25 @@ Paul Mackerras <paulus@samba.org> writes:
 
 > On Mon, Mar 04, 2013 at 05:11:53PM +0530, Aneesh Kumar K.V wrote:
 >> Paul Mackerras <paulus@samba.org> writes:
->> >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psiz=
-e)
+>> >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psize)
 >> >> +{
 >> >> +	unsigned int mask;
 >> >> +	int i, penc, shift;
 >> >> +	/* Look at the 8 bit LP value */
->> >> +	unsigned int lp =3D (hptep->r >> LP_SHIFT) & ((1 << LP_BITS) - 1);
+>> >> +	unsigned int lp = (hptep->r >> LP_SHIFT) & ((1 << LP_BITS) - 1);
 >> >> +
->> >> +	penc =3D 0;
->> >> +	for (i =3D 0; i < MMU_PAGE_COUNT; i++) {
+>> >> +	penc = 0;
+>> >> +	for (i = 0; i < MMU_PAGE_COUNT; i++) {
 >> >> +		/* valid entries have a shift value */
 >> >> +		if (!mmu_psize_defs[i].shift)
 >> >> +			continue;
 >> >> +
 >> >> +		/* encoding bits per actual page size */
->> >> +		shift =3D mmu_psize_defs[i].shift - 11;
+>> >> +		shift = mmu_psize_defs[i].shift - 11;
 >> >> +		if (shift > 9)
->> >> +			shift =3D 9;
->> >> +		mask =3D (1 << shift) - 1;
->> >> +		if ((lp & mask) =3D=3D mmu_psize_defs[psize].penc[i])
+>> >> +			shift = 9;
+>> >> +		mask = (1 << shift) - 1;
+>> >> +		if ((lp & mask) == mmu_psize_defs[psize].penc[i])
 >> >> +			return i;
 >> >> +	}
 >> >> +	return -1;
@@ -31,23 +30,23 @@ e)
 >> > 9 refer to, and I think the 9 should be LP_BITS (i.e. 8).  Secondly,
 >> > the mask for the comparison needs to depend on the actual page size
 >> > not the base page size.
->>=20
+>> 
 >> That 11 should be 12.That depends on the fact that we have below mapping
 >
 > And the 12 should be LP_SHIFT, shouldn't it?
 
 LP_SHIFT would indicate how many bit poisition need to be shifted to get
 to the LP field in HPTE. I guess what we want here is shift value for 4K
-page.  How about=20
+page.  How about 
 
-shift =3D mmu_psize_defs[i].shift - mmu_psize_defs[MMU_PAGE_4K].shift;
+shift = mmu_psize_defs[i].shift - mmu_psize_defs[MMU_PAGE_4K].shift;
 
 
 >
->>  rrrr rrrz 	=E2=89=A58KB
->>=20
->> Yes, that 9 should be LP_BITs.=20
->>=20
+>>  rrrr rrrz 	≥8KB
+>> 
+>> Yes, that 9 should be LP_BITs. 
+>> 
 >> We are generating mask based on actual page size above (variable i in
 >> the for loop).
 >
@@ -55,19 +54,18 @@ shift =3D mmu_psize_defs[i].shift - mmu_psize_defs[MMU_PAGE_4K].shift;
 >
 >> > I don't see where in this function you set the penc[] elements for
 >> > invalid actual page sizes to -1.
->>=20
+>> 
 >> We do the below
->>=20
+>> 
 >> --- a/arch/powerpc/mm/hash_utils_64.c
 >> +++ b/arch/powerpc/mm/hash_utils_64.c
->> @@ -125,7 +125,7 @@ static struct mmu_psize_def mmu_psize_defaults_old[]=
- =3D {
->>         [MMU_PAGE_4K] =3D {
->>                 .shift  =3D 12,
->>                 .sllp   =3D 0,
->> -               .penc   =3D 0,
->> +               .penc   =3D { [0 ... MMU_PAGE_COUNT - 1] =3D -1 },
->>                 .avpnm  =3D 0,
+>> @@ -125,7 +125,7 @@ static struct mmu_psize_def mmu_psize_defaults_old[] = {
+>>         [MMU_PAGE_4K] = {
+>>                 .shift  = 12,
+>>                 .sllp   = 0,
+>> -               .penc   = 0,
+>> +               .penc   = { [0 ... MMU_PAGE_COUNT - 1] = -1 },
+>>                 .avpnm  = 0,
 >
 > Yes, which sets them for the entries you initialize, but not for the
 > others.  For example, the entry for MMU_PAGE_64K will initially be all
@@ -83,24 +81,24 @@ Noticed that earlier. This is what i currently have.
 +static void mmu_psize_set_default_penc(struct mmu_psize_def *mmu_psize)
 +{
 +	int bpsize, apsize;
-+	for (bpsize =3D 0; bpsize < MMU_PAGE_COUNT; bpsize++)
-+		for (apsize =3D 0; apsize < MMU_PAGE_COUNT; apsize++)
-+			mmu_psize[bpsize].penc[apsize] =3D -1;
++	for (bpsize = 0; bpsize < MMU_PAGE_COUNT; bpsize++)
++		for (apsize = 0; apsize < MMU_PAGE_COUNT; apsize++)
++			mmu_psize[bpsize].penc[apsize] = -1;
 +}
 +
  static void __init htab_init_page_sizes(void)
  {
  	int rc;
-=20
+ 
 +	mmu_psize_set_default_penc(mmu_psize_defaults_old);
 +
  	/* Default to 4K pages only */
  	memcpy(mmu_psize_defs, mmu_psize_defaults_old,
  	       sizeof(mmu_psize_defaults_old));
 @@ -411,6 +443,8 @@ static void __init htab_init_page_sizes(void)
- 	if (rc !=3D 0)  /* Found */
+ 	if (rc != 0)  /* Found */
  		goto found;
-=20
+ 
 +	mmu_psize_set_default_penc(mmu_psize_defaults_gp);
 +
  	/*
@@ -118,3 +116,9 @@ Noticed that earlier. This is what i currently have.
 Ok. Fixed now.
 
 -aneesh
+
+--
+To unsubscribe, send a message with 'unsubscribe linux-mm' in
+the body to majordomo@kvack.org.  For more info on Linux MM,
+see: http://www.linux-mm.org/ .
+Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
diff --git a/a/content_digest b/N1/content_digest
index 2169137..1eabf7d 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -7,7 +7,8 @@
  "Subject\0Re: [PATCH -V1 09/24] powerpc: Decode the pte-lp-encoding bits correctly.\0"
  "Date\0Wed, 06 Mar 2013 10:00:21 +0530\0"
  "To\0Paul Mackerras <paulus@samba.org>\0"
- "Cc\0linuxppc-dev@lists.ozlabs.org"
+ "Cc\0benh@kernel.crashing.org"
+  linuxppc-dev@lists.ozlabs.org
  " linux-mm@kvack.org\0"
  "\00:1\0"
  "b\0"
@@ -15,26 +16,25 @@
  "\n"
  "> On Mon, Mar 04, 2013 at 05:11:53PM +0530, Aneesh Kumar K.V wrote:\n"
  ">> Paul Mackerras <paulus@samba.org> writes:\n"
- ">> >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psiz=\n"
- "e)\n"
+ ">> >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psize)\n"
  ">> >> +{\n"
  ">> >> +\tunsigned int mask;\n"
  ">> >> +\tint i, penc, shift;\n"
  ">> >> +\t/* Look at the 8 bit LP value */\n"
- ">> >> +\tunsigned int lp =3D (hptep->r >> LP_SHIFT) & ((1 << LP_BITS) - 1);\n"
+ ">> >> +\tunsigned int lp = (hptep->r >> LP_SHIFT) & ((1 << LP_BITS) - 1);\n"
  ">> >> +\n"
- ">> >> +\tpenc =3D 0;\n"
- ">> >> +\tfor (i =3D 0; i < MMU_PAGE_COUNT; i++) {\n"
+ ">> >> +\tpenc = 0;\n"
+ ">> >> +\tfor (i = 0; i < MMU_PAGE_COUNT; i++) {\n"
  ">> >> +\t\t/* valid entries have a shift value */\n"
  ">> >> +\t\tif (!mmu_psize_defs[i].shift)\n"
  ">> >> +\t\t\tcontinue;\n"
  ">> >> +\n"
  ">> >> +\t\t/* encoding bits per actual page size */\n"
- ">> >> +\t\tshift =3D mmu_psize_defs[i].shift - 11;\n"
+ ">> >> +\t\tshift = mmu_psize_defs[i].shift - 11;\n"
  ">> >> +\t\tif (shift > 9)\n"
- ">> >> +\t\t\tshift =3D 9;\n"
- ">> >> +\t\tmask =3D (1 << shift) - 1;\n"
- ">> >> +\t\tif ((lp & mask) =3D=3D mmu_psize_defs[psize].penc[i])\n"
+ ">> >> +\t\t\tshift = 9;\n"
+ ">> >> +\t\tmask = (1 << shift) - 1;\n"
+ ">> >> +\t\tif ((lp & mask) == mmu_psize_defs[psize].penc[i])\n"
  ">> >> +\t\t\treturn i;\n"
  ">> >> +\t}\n"
  ">> >> +\treturn -1;\n"
@@ -44,23 +44,23 @@
  ">> > 9 refer to, and I think the 9 should be LP_BITS (i.e. 8).  Secondly,\n"
  ">> > the mask for the comparison needs to depend on the actual page size\n"
  ">> > not the base page size.\n"
- ">>=20\n"
+ ">> \n"
  ">> That 11 should be 12.That depends on the fact that we have below mapping\n"
  ">\n"
  "> And the 12 should be LP_SHIFT, shouldn't it?\n"
  "\n"
  "LP_SHIFT would indicate how many bit poisition need to be shifted to get\n"
  "to the LP field in HPTE. I guess what we want here is shift value for 4K\n"
- "page.  How about=20\n"
+ "page.  How about \n"
  "\n"
- "shift =3D mmu_psize_defs[i].shift - mmu_psize_defs[MMU_PAGE_4K].shift;\n"
+ "shift = mmu_psize_defs[i].shift - mmu_psize_defs[MMU_PAGE_4K].shift;\n"
  "\n"
  "\n"
  ">\n"
- ">>  rrrr rrrz \t=E2=89=A58KB\n"
- ">>=20\n"
- ">> Yes, that 9 should be LP_BITs.=20\n"
- ">>=20\n"
+ ">>  rrrr rrrz \t\342\211\2458KB\n"
+ ">> \n"
+ ">> Yes, that 9 should be LP_BITs. \n"
+ ">> \n"
  ">> We are generating mask based on actual page size above (variable i in\n"
  ">> the for loop).\n"
  ">\n"
@@ -68,19 +68,18 @@
  ">\n"
  ">> > I don't see where in this function you set the penc[] elements for\n"
  ">> > invalid actual page sizes to -1.\n"
- ">>=20\n"
+ ">> \n"
  ">> We do the below\n"
- ">>=20\n"
+ ">> \n"
  ">> --- a/arch/powerpc/mm/hash_utils_64.c\n"
  ">> +++ b/arch/powerpc/mm/hash_utils_64.c\n"
- ">> @@ -125,7 +125,7 @@ static struct mmu_psize_def mmu_psize_defaults_old[]=\n"
- " =3D {\n"
- ">>         [MMU_PAGE_4K] =3D {\n"
- ">>                 .shift  =3D 12,\n"
- ">>                 .sllp   =3D 0,\n"
- ">> -               .penc   =3D 0,\n"
- ">> +               .penc   =3D { [0 ... MMU_PAGE_COUNT - 1] =3D -1 },\n"
- ">>                 .avpnm  =3D 0,\n"
+ ">> @@ -125,7 +125,7 @@ static struct mmu_psize_def mmu_psize_defaults_old[] = {\n"
+ ">>         [MMU_PAGE_4K] = {\n"
+ ">>                 .shift  = 12,\n"
+ ">>                 .sllp   = 0,\n"
+ ">> -               .penc   = 0,\n"
+ ">> +               .penc   = { [0 ... MMU_PAGE_COUNT - 1] = -1 },\n"
+ ">>                 .avpnm  = 0,\n"
  ">\n"
  "> Yes, which sets them for the entries you initialize, but not for the\n"
  "> others.  For example, the entry for MMU_PAGE_64K will initially be all\n"
@@ -96,24 +95,24 @@
  "+static void mmu_psize_set_default_penc(struct mmu_psize_def *mmu_psize)\n"
  "+{\n"
  "+\tint bpsize, apsize;\n"
- "+\tfor (bpsize =3D 0; bpsize < MMU_PAGE_COUNT; bpsize++)\n"
- "+\t\tfor (apsize =3D 0; apsize < MMU_PAGE_COUNT; apsize++)\n"
- "+\t\t\tmmu_psize[bpsize].penc[apsize] =3D -1;\n"
+ "+\tfor (bpsize = 0; bpsize < MMU_PAGE_COUNT; bpsize++)\n"
+ "+\t\tfor (apsize = 0; apsize < MMU_PAGE_COUNT; apsize++)\n"
+ "+\t\t\tmmu_psize[bpsize].penc[apsize] = -1;\n"
  "+}\n"
  "+\n"
  " static void __init htab_init_page_sizes(void)\n"
  " {\n"
  " \tint rc;\n"
- "=20\n"
+ " \n"
  "+\tmmu_psize_set_default_penc(mmu_psize_defaults_old);\n"
  "+\n"
  " \t/* Default to 4K pages only */\n"
  " \tmemcpy(mmu_psize_defs, mmu_psize_defaults_old,\n"
  " \t       sizeof(mmu_psize_defaults_old));\n"
  "@@ -411,6 +443,8 @@ static void __init htab_init_page_sizes(void)\n"
- " \tif (rc !=3D 0)  /* Found */\n"
+ " \tif (rc != 0)  /* Found */\n"
  " \t\tgoto found;\n"
- "=20\n"
+ " \n"
  "+\tmmu_psize_set_default_penc(mmu_psize_defaults_gp);\n"
  "+\n"
  " \t/*\n"
@@ -130,6 +129,12 @@
  "\n"
  "Ok. Fixed now.\n"
  "\n"
- -aneesh
+ "-aneesh\n"
+ "\n"
+ "--\n"
+ "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n"
+ "the body to majordomo@kvack.org.  For more info on Linux MM,\n"
+ "see: http://www.linux-mm.org/ .\n"
+ "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>"
 
-bad8896df784fdee7bcb57d621a8742cb971c5276e572e807836460e4105b11c
+249dab73623b9400ac05fbf13c5275e6ad1177f0f2ba53419aef3543df833241

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.