Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
43df5eac
Commit
43df5eac
authored
19 years ago
by
Linus Torvalds
Browse files
Options
Downloads
Plain Diff
Merge
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
parents
7be426c6
e55c57e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/serial/sunzilog.c
+4
-4
4 additions, 4 deletions
drivers/serial/sunzilog.c
include/asm-sparc64/termios.h
+41
-37
41 additions, 37 deletions
include/asm-sparc64/termios.h
with
45 additions
and
41 deletions
drivers/serial/sunzilog.c
+
4
−
4
View file @
43df5eac
...
@@ -1071,7 +1071,7 @@ static void __init sunzilog_alloc_tables(void)
...
@@ -1071,7 +1071,7 @@ static void __init sunzilog_alloc_tables(void)
*/
*/
static
struct
zilog_layout
__iomem
*
__init
get_zs_sun4u
(
int
chip
,
int
zsnode
)
static
struct
zilog_layout
__iomem
*
__init
get_zs_sun4u
(
int
chip
,
int
zsnode
)
{
{
unsigned
long
mapped_addr
;
void
__iomem
*
mapped_addr
;
unsigned
int
sun4u_ino
;
unsigned
int
sun4u_ino
;
struct
sbus_bus
*
sbus
=
NULL
;
struct
sbus_bus
*
sbus
=
NULL
;
struct
sbus_dev
*
sdev
=
NULL
;
struct
sbus_dev
*
sdev
=
NULL
;
...
@@ -1111,9 +1111,9 @@ static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode)
...
@@ -1111,9 +1111,9 @@ static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode)
apply_fhc_ranges
(
central_bus
->
child
,
apply_fhc_ranges
(
central_bus
->
child
,
&
zsregs
[
0
],
1
);
&
zsregs
[
0
],
1
);
apply_central_ranges
(
central_bus
,
&
zsregs
[
0
],
1
);
apply_central_ranges
(
central_bus
,
&
zsregs
[
0
],
1
);
mapped_addr
=
mapped_addr
=
(
void
__iomem
*
)
(((
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
(((
(
u64
)
zsregs
[
0
].
which_io
)
<<
32UL
)
|
((
u64
)
zsregs
[
0
].
phys_addr
);
((
u64
)
zsregs
[
0
].
phys_addr
)
)
;
}
}
if
(
zilog_irq
==
-
1
)
{
if
(
zilog_irq
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
include/asm-sparc64/termios.h
+
41
−
37
View file @
43df5eac
...
@@ -100,16 +100,17 @@ struct winsize {
...
@@ -100,16 +100,17 @@ struct winsize {
#define user_termio_to_kernel_termios(termios, termio) \
#define user_termio_to_kernel_termios(termios, termio) \
({ \
({ \
unsigned short tmp; \
unsigned short tmp; \
get_user(tmp, &(termio)->c_iflag); \
int err; \
err = get_user(tmp, &(termio)->c_iflag); \
(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
get_user(tmp, &(termio)->c_oflag); \
err |=
get_user(tmp, &(termio)->c_oflag); \
(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
(termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \
get_user(tmp, &(termio)->c_cflag); \
err |=
get_user(tmp, &(termio)->c_cflag); \
(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
(termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \
get_user(tmp, &(termio)->c_lflag); \
err |=
get_user(tmp, &(termio)->c_lflag); \
(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
err |=
copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
0
; \
err
; \
})
})
/*
/*
...
@@ -119,53 +120,56 @@ struct winsize {
...
@@ -119,53 +120,56 @@ struct winsize {
*/
*/
#define kernel_termios_to_user_termio(termio, termios) \
#define kernel_termios_to_user_termio(termio, termios) \
({ \
({ \
put_user((termios)->c_iflag, &(termio)->c_iflag); \
int err; \
put_user((termios)->c_oflag, &(termio)->c_oflag); \
err = put_user((termios)->c_iflag, &(termio)->c_iflag); \
put_user((termios)->c_cflag, &(termio)->c_cflag); \
err |= put_user((termios)->c_oflag, &(termio)->c_oflag); \
put_user((termios)->c_lflag, &(termio)->c_lflag); \
err |= put_user((termios)->c_cflag, &(termio)->c_cflag); \
put_user((termios)->c_line, &(termio)->c_line); \
err |= put_user((termios)->c_lflag, &(termio)->c_lflag); \
copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
err |= put_user((termios)->c_line, &(termio)->c_line); \
err |= copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
if (!((termios)->c_lflag & ICANON)) { \
if (!((termios)->c_lflag & ICANON)) { \
put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
err |=
put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
err |=
put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
} \
} \
0
; \
err
; \
})
})
#define user_termios_to_kernel_termios(k, u) \
#define user_termios_to_kernel_termios(k, u) \
({ \
({ \
get_user((k)->c_iflag, &(u)->c_iflag); \
int err; \
get_user((k)->c_oflag, &(u)->c_oflag); \
err = get_user((k)->c_iflag, &(u)->c_iflag); \
get_user((k)->c_cflag, &(u)->c_cflag); \
err |= get_user((k)->c_oflag, &(u)->c_oflag); \
get_user((k)->c_lflag, &(u)->c_lflag); \
err |= get_user((k)->c_cflag, &(u)->c_cflag); \
get_user((k)->c_line, &(u)->c_line); \
err |= get_user((k)->c_lflag, &(u)->c_lflag); \
copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
err |= get_user((k)->c_line, &(u)->c_line); \
err |= copy_from_user((k)->c_cc, (u)->c_cc, NCCS); \
if((k)->c_lflag & ICANON) { \
if((k)->c_lflag & ICANON) { \
get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
err |=
get_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
err |=
get_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
} else { \
} else { \
get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
err |=
get_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
err |=
get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
} \
} \
0
; \
err
; \
})
})
#define kernel_termios_to_user_termios(u, k) \
#define kernel_termios_to_user_termios(u, k) \
({ \
({ \
put_user((k)->c_iflag, &(u)->c_iflag); \
int err; \
put_user((k)->c_oflag, &(u)->c_oflag); \
err = put_user((k)->c_iflag, &(u)->c_iflag); \
put_user((k)->c_cflag, &(u)->c_cflag); \
err |= put_user((k)->c_oflag, &(u)->c_oflag); \
put_user((k)->c_lflag, &(u)->c_lflag); \
err |= put_user((k)->c_cflag, &(u)->c_cflag); \
put_user((k)->c_line, &(u)->c_line); \
err |= put_user((k)->c_lflag, &(u)->c_lflag); \
copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
err |= put_user((k)->c_line, &(u)->c_line); \
err |= copy_to_user((u)->c_cc, (k)->c_cc, NCCS); \
if(!((k)->c_lflag & ICANON)) { \
if(!((k)->c_lflag & ICANON)) { \
put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
err |=
put_user((k)->c_cc[VMIN], &(u)->c_cc[_VMIN]); \
put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
err |=
put_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
} else { \
} else { \
put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
err |=
put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
err |=
put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
} \
} \
0
; \
err
; \
})
})
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment