Commit Graph

153 Commits

Author SHA1 Message Date
Lv Zheng
b2294cae77 Divergence: remove unwanted spaces for typedef
This patch removes unwanted spaces for typedef. This solution doesn't cover
function types.

Note that the linuxize result of this commit is very giant and should have
many conflicts against the current Linux upstream. Thus it is required to
modify the linuxize result of this commit and the commits around it
manually in order to have them merged to the Linux upstream. Since this is
very costy, we should do this only once, and if we can't ensure to do this
only once, we need to revert the Linux code to the wrong indentation result
before merging the linuxize result of this commit. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-03-29 13:20:49 +08:00
Lv Zheng
330027799a Linuxize: Remove useless platform headers
Some platform headers are leaked to Linux during release cycle.
This patch removes them. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-03-23 10:56:18 +08:00
Lv Zheng
bc2d3daa4b Linuxize: Export debugger files to Linux
This patch exports debugger files to Linux.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2015-09-25 10:11:40 +08:00
Lv Zheng
043144b445 Linuxize: Remove unwanted portable headers.
This patch removes portable headers that do not suitable for Linux. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2015-06-18 15:30:40 +08:00
Lv Zheng
ed0292d4e9 Linuxize: Eliminate "-" in the generated patch names.
Allow users of the script to specify any patch name prefix, and users can
still specify "-" when they want. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2015-06-16 14:47:22 +08:00
Lv Zheng
ac9e9716d9 Linuxize: Remove header files for Linux release.
This patch removes other DragonFly BSD headers from Linux kernel. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2015-05-05 09:41:23 +08:00
Lv Zheng
8a51692d6e Linuxize: Fix several issues in the gen-patch.sh.
It is detected by Paul that the generated patch contains Data instead of
Date. Also we need "Fixed-by" and "Original-by" keywords for SOB blocks.

Reported-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2015-01-27 09:48:05 +08:00
Lv Zheng
a612f666bd Linuxize: Add upstream commit ID in the generated patches.
This patch adds support to add ACPICA upstream Commit ID/Author in the
generated linuxized patches. This format follows Linux stable material
format. The modifications include:
1. distiguish COMMITTER, AUTHOR, MAINTAINER:
   1. COMMITTER is automatically extracted using "git config --get";
   2. AUTHOR is automatically extracted using "git log --format=%aN <%aE>";
   3. MAINTAINER is fixed in make-patches.sh, currently it is
      "Bob Moore <robert.moore@intel.com>".
2. add AUTHOR and COMMIT ID information to form the ACPICA release patch
   header.
3. automatically correct "Robert Moore <Robert.Moore@intel.com>" to
   "Bob Moore <bob.moore@intel.com>".
4. automatically remove last empty lines in the patch description.
5. automatically append unique Signed-off-by for AUTHOR, NAINTAINER and
   COMMITTER.
6. automatically add commit URL before SOBs and add "-l" option to be ready
   for changing the host of the repo.
7. fix the issue that the default "commit ID" for gen-patch.sh is not
   implemented.
8. distiguish upstream generation and local generation using "-u" option.
The generated patch format with upstream commit ID is ACKed by the Linux
ACPI maintainer. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-12-11 14:28:21 +08:00
Lv Zheng
58887a7b95 Common: Enhance CmGetFileSize() to improve portability.
This patch uses abstract file IO and AcpiLogError() APIs to enhance
CmGetFileSize() so that applications that invoke this API could have
portability improved.

With actual references added to abstract file IO and AcpiLogError(), the
applications need to link utlibcfs.o, utdebug.o, utexcep.o, utmath.o,
utprint.o and utxferror.o.
Though it is required to add AcpiOsInitialize() invocations if an
application starts to use AcpiLogError(), this doesn't appear in this
patch. A previous patch in the same series should have already added
AcpiOsInitialize() invocations for all applications. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-06-12 15:16:19 +08:00
Lv Zheng
5bc4ac7ffc OSL: Cleanup AcpiOsPrintf()/AcpiOsVprintf() stubs.
This patch is mainly for acpidump where there are redundant
AcpiOsPrintf()/AcpiOsVprintf() stubs implemented. This patch cleans up such
specific implementation by linking acpidump to osunixxf.c/oswinxf.c.

To make AcpiOsPrintf() exported by osunixxf.c/oswinxf.c to behave as the
old acpidump specific ones, applications need to:
1. Initialize AcpiGbl_DbOutputFlags to ACPI_DB_CONSOLE_OUTPUT.
   This is automatically done by ACPI_INIT_GLOBAL(), applications need to
   link utglobal.o to utilize this mechanism.
2. Initialize AcpiGbl_OutputFile to stdout.
   For GCC, assigning stdout to AcpiGbl_OutputFile using ACPI_INIT_GLOBAL()
   is not possible as stdout is not a constant in GCC environment. As an
   alternative solution, stdout assignment is put into AcpiOsInitialize().
   Thus AcpiOsInitialize() need to be invoked very early by the
   applications to initialize the default output of AcpiOsPrintf().

Note that acpidump has been released to Linux kernel, after adding
osunixxf.c to generate/unix/acpidump/Makefile, libacpica.sh also need to be
updated to release osunixxf.c to Linux kernel. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-06-12 15:13:10 +08:00
Lv Zheng
3c1fecab89 acpidump: Update new structures and add missing file.
This patch updates release automation with new structures and files that
are used by the newly released acpidump.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-04-10 09:55:21 +08:00
Robert Moore
f7009bfa08 AcpiDump: Add support to generate acpidump release.
This pactch adds AcpiDump release automation support. Lv Zheng.
2014-03-25 07:58:36 -07:00
Robert Moore
3f4da4257d AcpiSrc: Add support for patch files.
This change add support to invoke necessary conversions on patch
descriptions in the release process so that human intervention can be reduced.

After applying, data types/structures and mixed case words will be
converted.  It reduces human intervention greatly but we still need to
check the URL address fields (From/Signed-off-by/Buglink/Reported-by/
Tested-by/Original-by/etc.) after conversion as there are low
possibilities that they are matched to the target conversion types.
Lv Zheng.
2014-01-10 14:06:33 -08:00
Robert Moore
40bbabbc18 Linuxize: Cleanup format conversions.
As AcpiSrc supports the case that the input/output files are the same file,
ACPICA_TMP is not useful for divergence.sh any more.
This patch cleans up ACPICA_TMP by invoking new linuxize_format() function
provided by libacpica.sh.  A similar cleanup is also done in gen-repo.sh in
this patch. Lv Zheng.
2013-12-17 13:30:25 -08:00
Robert Moore
1097e067b9 Linux: Consistently use the bash shell for linuxize scripts.
This patch changes "sh" to "bash" as there are only limitted
shell clones tested for the linuxize scripts.  Lv Zheng.
2013-11-14 08:43:05 -08:00
Robert Moore
ef9997164a Update scripts to use "." instead of "source".
Improves portability of the various scripts. Lv Zheng.
2013-11-08 08:11:48 -08:00
Robert Moore
37910d344c Fix some miscellaneous Linux generation issues.
Fixes some issues detected by the divergences check step of the ACPICA
20130927 release QA process:

1. AcpiSrc -i mode is not executed for divergence.sh.
2. 2 files containing ACPI_EXPORT_SYMBOL are not marked with
   EXPORT_ACPI_INTERFACES.
Lv Zheng.
2013-11-07 12:54:59 -08:00
Robert Moore
bffc163770 AcpiSrc: Add support to modify include file paths/names.
This change adds support to enable AcpiSrc to modify include file
pathnames and/or filenames. This is useful for linuxization.
Lv Zheng.
2013-09-27 08:27:15 -07:00
Robert Moore
b83c59cdca Linuxize: Add local declarations for script subfunctions.
All functions defined for the linuxizing scripts lack "local"
declarations.  This patch adds "local" for all such variables.  No
functional changes.  Lv Zheng.
2013-09-27 08:10:00 -07:00
Robert Moore
d09bc88ad2 AcpiSrc: Fix indentation issues for macro invocations.
During the linuxizing process, some extra white spaces are added by the
"indent" program at the beginning of the line which is an invocation of a
macro and there is no ";" at the end of the line.

This patch adds new mode to AcpiSrc to remove extra spaces inserted before
invoking such macros and add an empty line between the invocations of such
macros (like the other function declarations).  This new mode is executed
after executing "indent" during the Linux release process.

The affected macros and files are:
 1. ACPI_HW_DEPENDENT_RETURN (acpixf.h):
    This macro is used as a wrapper for hardware dependent APIs to offer a
    stub when the reduced hardware is configured during compilation.
 2. ACPI_EXPORT_SYMBOL (utglobal.c):
    This macro is used by Linux to export symbols to be found by Linux
    modules.  All such invocations are well formatted except those exported
    as global variables.

This can help to reduce the source code differences between Linux and
ACPICA, and also help to automate the release process.  Lv Zheng.
2013-09-26 08:33:05 -07:00
Robert Moore
3262a4bfb0 Linuxize: Change indentation of C labels.
It is reported by kernel build test systems that all ACPICA linuxized
files have incorrect label indentation.  This patch changes default indent
option to fix this bug.  Lv Zheng.
2013-09-19 07:58:02 -07:00
Robert Moore
c0671907c6 Linuxize: Fix several issues in libacpica.sh
This patch includes the following fixes:
1. removes non-Linux header files from release process.
2. makes the path names in the generated divergences diff to be relative
   path names.
These changes affect the scripts in the generate/linux folder.  Lv Zheng.
2013-09-18 12:46:01 -07:00
Robert Moore
a7b23d6256 Linuxize: Split git-extract.sh into two scripts.
This patch splits git-extract.sh so that the changes made in the
scripts can be linuxized into patches. Lv Zheng.
2013-09-18 12:41:12 -07:00
Robert Moore
ac4b505600 Linux scripts: Update file permissions to add execute.
Simple change to add execute permission as the default.
2013-08-23 08:19:18 -07:00
Robert Moore
e4eeff5dba Linuxize scripts: Add an ACPICA release library.
This patch removes deprecated generate/linux/patches folder, moves useful
release scripts to the generate/linux folder, reduces code redundancy by
creating a script library libacpica.sh file under generate/linux folder.
Lv Zheng.
2013-08-22 08:33:00 -07:00
Robert Moore
2160740a2d Linux patch makefiles: Improve patch generation.
The make-patches.pl will generate patches with broken patch descriptions.  This
is because the script is written to generate Linuxized patches for CVS commits.
The complexity in the make-patches.pl is not needed as GIT has offered many
features to let the patch descriptions to be extracted correctly from the
command line.
The new make-patches.sh script invokes git-extract.sh to provide equivalent
functionalities as make-patches.pl for ACPICA release.  This patch also modifies
the git-extract.sh to allow generation of patches that can be used as a part of
an ACPICA release patch set.  Lv Zheng.
2013-07-31 14:52:18 -07:00
Robert Moore
8751a199dc Add new linux generation script for ACPICA.
git-extract.sh: can extract:
1. Linux source tree at a specified commit point
2. Linux patch for a specified commit From ACPICA repository
Lv Zheng.
2013-07-24 09:37:27 -07:00
Robert Moore
7d16594c20 Linux scripts: Update acpisrc generation script.
bin32 and bin64 are now obsolete, update script.
2013-07-19 09:43:58 -07:00
Robert Moore
223f4d39c5 Update Linux-specific script files.
Changes for divergence/patch scripts. Lv Zheng.
2013-03-27 11:36:31 -07:00
Robert Moore
711adab7d4 Linux scripts: Make AcpiSrc utility compile optional.
The enhancement of AcpiSrc generation per-commit could not meet
all requirements of the monthly ACPICA -> Linux release process.
This patch allows the per-commit generation to be selected by the
users. Lv Zheng.
2013-02-06 09:35:40 -08:00
Robert Moore
a37301083f Linuxize: Move acpisrc generation from make-patch.pl to linuxize.sh.
This fix can help to generate correct linuxized patch where the
version of the acpisrc is critical. Lv Zheng.
2013-01-16 09:40:46 -08:00
Robert Moore
f8873db6c0 Linuxize: Add patch header fields for linuxized patches.
Linuxized patches lack patch headers, thus can not be
directly applied to the Linux source codes. This patch updates
the scripts to allow patch headers to be generated for the
linuxized patches. Lv Zheng.
2013-01-16 09:38:17 -08:00
Robert Moore
cedd5d194a Update linux scripts.
Generation and divergence scripts. Lv Zheng.
2012-11-13 13:06:48 -08:00
Robert Moore
6c783a232a Update linux scripts.
Use the new generic makefiles for acpisrc utility.
Lv Zheng.
2012-09-21 10:34:30 -07:00
Robert Moore
dbf3ef2b43 Remove obsolete "Linux" makefiles.
These makefiles are obsolete and have been replaced by the generic
unix makefiles under acpica/generate/unix.
2012-09-06 08:49:17 -07:00
Robert Moore
6e0b539d0c Divergence script: Auto-select 32/64 versions of AcpiSrc utility.
Automatically determine the host bitwidth and generate the appropriate
version of the AcpiSrc conversion utility.
2012-07-31 10:07:21 -07:00
Robert Moore
4abb1d5754 Makefiles: Update for new file, utxfinit.c
New file created as a result of split of utxface.c
2012-07-19 10:47:55 -07:00
Robert Moore
5a77772e0d Update linux/ACPICA divergence script - add diffstat output.
Creates a diffstat.txt file
2012-07-17 15:08:17 -07:00
Robert Moore
b9058029d3 Linux/ACPICA divergence script: Add error checking.
Add some checks for input, etc.
2012-07-13 14:29:48 -07:00
Robert Moore
ff06513880 Update Linux/ACPICA divergence script.
Ensure operation on multiple types of hosts.
2012-07-13 10:22:24 -07:00
Robert Moore
91948ecb22 Add script to generate Linux/ACPICA divergences.
Simplify tracking of differences between Linux ACPICA code, and
the native ACPICA code.
2012-07-12 14:36:20 -07:00
Robert Moore
e4e99ffc4c Update for unix/linux makefiles.
1) Add -D_FORTIFY_SOURCE=2 to compile flags for Linux generation
2) Use "install" to install the utilities.
2012-07-11 13:50:33 -07:00
Robert Moore
83136604a9 Update makefiles/projectfiles for new file, tbxfload.c
updates all makefiles and MS project files.
2012-06-29 10:55:25 -07:00
Robert Moore
c725de3b1c AcpiHelp: Add new file (utexcep.c) to makefils and project files.
Adds support for the -e option to decode ACPICA exceptions.
2012-06-26 09:14:25 -07:00
Robert Moore
69823cf044 Update makefiles for new file, utexcep.c
Update the linux and unix makefiles.
2012-06-21 13:20:24 -07:00
Robert Moore
3773b5ac3e Project/Make files: Update for file move.
Moved ahpredef.c to the common directory for use by iASL
in addition to AcpiHelp.
2012-05-25 10:20:25 -07:00
Robert Moore
b99aec25a4 iASL: Update Linux/Unix makefiles for new file.
Add aslsupport.l
2012-04-02 14:52:16 -07:00
Robert Moore
c078edaa1c iASL: Update makefiles/project_files for the preprocessor.
New files added for the iASL preprocessor.
2012-03-15 13:48:53 -07:00
Robert Moore
aa4b5c6cfa Split sleep/wake functions into two files.
The functions for the original/legacy sleep/wake registers are
in hwsleep.c, and the functions for the new extended FADT V5
sleep registers are in hwesleep.c
2012-02-10 09:51:30 -08:00
Robert Moore
fe9c654a34 ACPI 5.0: Support for new FADT SleepStatus, SleepControl registers.
Adds sleep and wake support for systems with these registers.
One new file, hwxfsleep.c
2012-01-26 14:01:20 -08:00