Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-25 Thread Baoquan He
On 07/24/18 at 04:36pm, Chao Fan wrote:
> On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
> >Hi chao,
> >
> >On 07/23/18 at 05:29pm, Chao Fan wrote:
> >> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> >> so that the files in 'compressed' directory can read ACPI table
> >> by including this head file.
> >> 
> >> Signed-off-by: Chao Fan 
> >> ---
> >>  arch/x86/boot/compressed/acpitb.h | 7 +++
> >>  1 file changed, 7 insertions(+)
> >>  create mode 100644 arch/x86/boot/compressed/acpitb.h
> >> 
> >> diff --git a/arch/x86/boot/compressed/acpitb.h 
> >> b/arch/x86/boot/compressed/acpitb.h
> >> new file mode 100644
> >> index ..f8ab6e5b3e06
> >> --- /dev/null
> >> +++ b/arch/x86/boot/compressed/acpitb.h
> >> @@ -0,0 +1,7 @@
> >> +/* SPDX-License-Identifier: GPL-2.0 */
> >> +#include 
> >> +
> >> +#define ACPI_MAX_TABLES128
> >> +
> >> +/* Function to get ACPI SRAT table pointer. */
> >> +struct acpi_table_header *get_acpi_srat_table(void);
> >
> >Since acpitb.h includes so few lines of code, not sure if we can move
> >them into .c files directly.
> >
> >By the way, you might need to rebase this patchset on top of
> >tip/x86/boot.
> 
> Sorry Baoquan,
> 
> I tried to add this patcheset to the tip/x86/boot branch using both 'patch'
> command and 'git am'. I found no problem and no offset.
> So is there some problems when you use them?

That's great, just to remind.



Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-25 Thread Baoquan He
On 07/24/18 at 04:36pm, Chao Fan wrote:
> On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
> >Hi chao,
> >
> >On 07/23/18 at 05:29pm, Chao Fan wrote:
> >> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> >> so that the files in 'compressed' directory can read ACPI table
> >> by including this head file.
> >> 
> >> Signed-off-by: Chao Fan 
> >> ---
> >>  arch/x86/boot/compressed/acpitb.h | 7 +++
> >>  1 file changed, 7 insertions(+)
> >>  create mode 100644 arch/x86/boot/compressed/acpitb.h
> >> 
> >> diff --git a/arch/x86/boot/compressed/acpitb.h 
> >> b/arch/x86/boot/compressed/acpitb.h
> >> new file mode 100644
> >> index ..f8ab6e5b3e06
> >> --- /dev/null
> >> +++ b/arch/x86/boot/compressed/acpitb.h
> >> @@ -0,0 +1,7 @@
> >> +/* SPDX-License-Identifier: GPL-2.0 */
> >> +#include 
> >> +
> >> +#define ACPI_MAX_TABLES128
> >> +
> >> +/* Function to get ACPI SRAT table pointer. */
> >> +struct acpi_table_header *get_acpi_srat_table(void);
> >
> >Since acpitb.h includes so few lines of code, not sure if we can move
> >them into .c files directly.
> >
> >By the way, you might need to rebase this patchset on top of
> >tip/x86/boot.
> 
> Sorry Baoquan,
> 
> I tried to add this patcheset to the tip/x86/boot branch using both 'patch'
> command and 'git am'. I found no problem and no offset.
> So is there some problems when you use them?

That's great, just to remind.



Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Chao Fan
On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
>Hi chao,
>
>On 07/23/18 at 05:29pm, Chao Fan wrote:
>> In order to parse ACPI tables, reuse the head file linux/acpi.h,
>> so that the files in 'compressed' directory can read ACPI table
>> by including this head file.
>> 
>> Signed-off-by: Chao Fan 
>> ---
>>  arch/x86/boot/compressed/acpitb.h | 7 +++
>>  1 file changed, 7 insertions(+)
>>  create mode 100644 arch/x86/boot/compressed/acpitb.h
>> 
>> diff --git a/arch/x86/boot/compressed/acpitb.h 
>> b/arch/x86/boot/compressed/acpitb.h
>> new file mode 100644
>> index ..f8ab6e5b3e06
>> --- /dev/null
>> +++ b/arch/x86/boot/compressed/acpitb.h
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#include 
>> +
>> +#define ACPI_MAX_TABLES128
>> +
>> +/* Function to get ACPI SRAT table pointer. */
>> +struct acpi_table_header *get_acpi_srat_table(void);
>
>Since acpitb.h includes so few lines of code, not sure if we can move
>them into .c files directly.
>
>By the way, you might need to rebase this patchset on top of
>tip/x86/boot.

Sorry Baoquan,

I tried to add this patcheset to the tip/x86/boot branch using both 'patch'
command and 'git am'. I found no problem and no offset.
So is there some problems when you use them?

Thanks,
Chao Fan

>
>Thanks
>Baoquan
>
>




Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Chao Fan
On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
>Hi chao,
>
>On 07/23/18 at 05:29pm, Chao Fan wrote:
>> In order to parse ACPI tables, reuse the head file linux/acpi.h,
>> so that the files in 'compressed' directory can read ACPI table
>> by including this head file.
>> 
>> Signed-off-by: Chao Fan 
>> ---
>>  arch/x86/boot/compressed/acpitb.h | 7 +++
>>  1 file changed, 7 insertions(+)
>>  create mode 100644 arch/x86/boot/compressed/acpitb.h
>> 
>> diff --git a/arch/x86/boot/compressed/acpitb.h 
>> b/arch/x86/boot/compressed/acpitb.h
>> new file mode 100644
>> index ..f8ab6e5b3e06
>> --- /dev/null
>> +++ b/arch/x86/boot/compressed/acpitb.h
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#include 
>> +
>> +#define ACPI_MAX_TABLES128
>> +
>> +/* Function to get ACPI SRAT table pointer. */
>> +struct acpi_table_header *get_acpi_srat_table(void);
>
>Since acpitb.h includes so few lines of code, not sure if we can move
>them into .c files directly.
>
>By the way, you might need to rebase this patchset on top of
>tip/x86/boot.

Sorry Baoquan,

I tried to add this patcheset to the tip/x86/boot branch using both 'patch'
command and 'git am'. I found no problem and no offset.
So is there some problems when you use them?

Thanks,
Chao Fan

>
>Thanks
>Baoquan
>
>




Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Chao Fan
On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
>Hi chao,
>
>On 07/23/18 at 05:29pm, Chao Fan wrote:
>> In order to parse ACPI tables, reuse the head file linux/acpi.h,
>> so that the files in 'compressed' directory can read ACPI table
>> by including this head file.
>> 
>> Signed-off-by: Chao Fan 
>> ---
>>  arch/x86/boot/compressed/acpitb.h | 7 +++
>>  1 file changed, 7 insertions(+)
>>  create mode 100644 arch/x86/boot/compressed/acpitb.h
>> 
>> diff --git a/arch/x86/boot/compressed/acpitb.h 
>> b/arch/x86/boot/compressed/acpitb.h
>> new file mode 100644
>> index ..f8ab6e5b3e06
>> --- /dev/null
>> +++ b/arch/x86/boot/compressed/acpitb.h
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#include 
>> +
>> +#define ACPI_MAX_TABLES128
>> +
>> +/* Function to get ACPI SRAT table pointer. */
>> +struct acpi_table_header *get_acpi_srat_table(void);
>
>Since acpitb.h includes so few lines of code, not sure if we can move
>them into .c files directly.

Both acpitb.c and kaslr.c in my PATCH will use this head file.
And also eboot.h is also simple, so I put this code alone.

>
>By the way, you might need to rebase this patchset on top of
>tip/x86/boot.

OK, now it is based on master of tip.
Will do it in next version.

Thanks,
Chao Fan

>
>Thanks
>Baoquan
>
>




Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Chao Fan
On Tue, Jul 24, 2018 at 02:02:57PM +0800, Baoquan He wrote:
>Hi chao,
>
>On 07/23/18 at 05:29pm, Chao Fan wrote:
>> In order to parse ACPI tables, reuse the head file linux/acpi.h,
>> so that the files in 'compressed' directory can read ACPI table
>> by including this head file.
>> 
>> Signed-off-by: Chao Fan 
>> ---
>>  arch/x86/boot/compressed/acpitb.h | 7 +++
>>  1 file changed, 7 insertions(+)
>>  create mode 100644 arch/x86/boot/compressed/acpitb.h
>> 
>> diff --git a/arch/x86/boot/compressed/acpitb.h 
>> b/arch/x86/boot/compressed/acpitb.h
>> new file mode 100644
>> index ..f8ab6e5b3e06
>> --- /dev/null
>> +++ b/arch/x86/boot/compressed/acpitb.h
>> @@ -0,0 +1,7 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +#include 
>> +
>> +#define ACPI_MAX_TABLES128
>> +
>> +/* Function to get ACPI SRAT table pointer. */
>> +struct acpi_table_header *get_acpi_srat_table(void);
>
>Since acpitb.h includes so few lines of code, not sure if we can move
>them into .c files directly.

Both acpitb.c and kaslr.c in my PATCH will use this head file.
And also eboot.h is also simple, so I put this code alone.

>
>By the way, you might need to rebase this patchset on top of
>tip/x86/boot.

OK, now it is based on master of tip.
Will do it in next version.

Thanks,
Chao Fan

>
>Thanks
>Baoquan
>
>




Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Baoquan He
Hi chao,

On 07/23/18 at 05:29pm, Chao Fan wrote:
> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> so that the files in 'compressed' directory can read ACPI table
> by including this head file.
> 
> Signed-off-by: Chao Fan 
> ---
>  arch/x86/boot/compressed/acpitb.h | 7 +++
>  1 file changed, 7 insertions(+)
>  create mode 100644 arch/x86/boot/compressed/acpitb.h
> 
> diff --git a/arch/x86/boot/compressed/acpitb.h 
> b/arch/x86/boot/compressed/acpitb.h
> new file mode 100644
> index ..f8ab6e5b3e06
> --- /dev/null
> +++ b/arch/x86/boot/compressed/acpitb.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#include 
> +
> +#define ACPI_MAX_TABLES128
> +
> +/* Function to get ACPI SRAT table pointer. */
> +struct acpi_table_header *get_acpi_srat_table(void);

Since acpitb.h includes so few lines of code, not sure if we can move
them into .c files directly.

By the way, you might need to rebase this patchset on top of
tip/x86/boot.

Thanks
Baoquan


Re: [PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-24 Thread Baoquan He
Hi chao,

On 07/23/18 at 05:29pm, Chao Fan wrote:
> In order to parse ACPI tables, reuse the head file linux/acpi.h,
> so that the files in 'compressed' directory can read ACPI table
> by including this head file.
> 
> Signed-off-by: Chao Fan 
> ---
>  arch/x86/boot/compressed/acpitb.h | 7 +++
>  1 file changed, 7 insertions(+)
>  create mode 100644 arch/x86/boot/compressed/acpitb.h
> 
> diff --git a/arch/x86/boot/compressed/acpitb.h 
> b/arch/x86/boot/compressed/acpitb.h
> new file mode 100644
> index ..f8ab6e5b3e06
> --- /dev/null
> +++ b/arch/x86/boot/compressed/acpitb.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#include 
> +
> +#define ACPI_MAX_TABLES128
> +
> +/* Function to get ACPI SRAT table pointer. */
> +struct acpi_table_header *get_acpi_srat_table(void);

Since acpitb.h includes so few lines of code, not sure if we can move
them into .c files directly.

By the way, you might need to rebase this patchset on top of
tip/x86/boot.

Thanks
Baoquan


[PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-23 Thread Chao Fan
In order to parse ACPI tables, reuse the head file linux/acpi.h,
so that the files in 'compressed' directory can read ACPI table
by including this head file.

Signed-off-by: Chao Fan 
---
 arch/x86/boot/compressed/acpitb.h | 7 +++
 1 file changed, 7 insertions(+)
 create mode 100644 arch/x86/boot/compressed/acpitb.h

diff --git a/arch/x86/boot/compressed/acpitb.h 
b/arch/x86/boot/compressed/acpitb.h
new file mode 100644
index ..f8ab6e5b3e06
--- /dev/null
+++ b/arch/x86/boot/compressed/acpitb.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include 
+
+#define ACPI_MAX_TABLES128
+
+/* Function to get ACPI SRAT table pointer. */
+struct acpi_table_header *get_acpi_srat_table(void);
-- 
2.17.1





[PATCH v4 1/4] x86/boot: Add acpitb.h to help parse acpi tables

2018-07-23 Thread Chao Fan
In order to parse ACPI tables, reuse the head file linux/acpi.h,
so that the files in 'compressed' directory can read ACPI table
by including this head file.

Signed-off-by: Chao Fan 
---
 arch/x86/boot/compressed/acpitb.h | 7 +++
 1 file changed, 7 insertions(+)
 create mode 100644 arch/x86/boot/compressed/acpitb.h

diff --git a/arch/x86/boot/compressed/acpitb.h 
b/arch/x86/boot/compressed/acpitb.h
new file mode 100644
index ..f8ab6e5b3e06
--- /dev/null
+++ b/arch/x86/boot/compressed/acpitb.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include 
+
+#define ACPI_MAX_TABLES128
+
+/* Function to get ACPI SRAT table pointer. */
+struct acpi_table_header *get_acpi_srat_table(void);
-- 
2.17.1